Here's my current chart:
Is it possible to get the green and red series to connect points based on the dependent value (TVD) and not the independent value (Pressure)?
I'd like to connect the points based on the increase in TVD.
My series are bound to values found in a list of objects. The list of objects is sorted based on the increase in TVD, but when I bind my list to the series, the points connect based on increase in pressure.
I guess your Independent Axis (Pressure) is set to orientation X, and the Dependent Axis (TVD) is orientaton Y.
You should be able to get the results you want by setting the Independent Axis to the TVD value, and its orientation to Y. The pressure values would then go onto the Dependent Axis with orientation X.
I would hazard a guess that it isn't possible.
I was able to reproduce the chart sorting the points in X order. Indeed, it seems the LineSeries class (or rather its superclass, LineAreaSeriesBase, source), keeps the points in a collection ordered by independent value. So, the LineSeries will completely ignore the order in which you supply the points.
The next thing I tried was swapping the X and Y axes. I tried a few things that I thought would work but in the end all I got was an 'Assigned independent axis cannot be used' exception. Google turned up this post on the MSDN forums about a year ago, in which another user asks the same question and gets no helpful answers.
If you really want a chart plotting points in order of TVD, then I would have to recommend abandoning the Silverlight Toolkit chart and using a third-party control instead. Every time I've attempted to use the Silverlight Toolkit chart I've run up against an issue or an inflexibility with it. In my opinion it's just not good enough for production use. You're evidently working for the oil industry, so it's not like they can't afford a few hundred dollars for a licence for one of these libraries.
Related
I'm performing some geographical computations in a grid with squares (i.e. regions). I'm using Delphi, but the logic could probably be applied to C++ too. Let me first explain what I want to do.
The following image is a portion of my grid, which is represented by a two-dimensional array Square that denotes the centre point in each square, and the "movement through the layers":
The green square has an X and Y coordinate of 2, so that is Square[2,2]. The actual coordinates are stored in Square[2,2].Latitude and Square[2,2].Longitude as wel as extra information in e.g. Square[2,2].Info that I use for computations.
Now comes the purpose: I need to do some computations on the surrounding areas. How many of the surrounding areas can be called "neighbours", depends on how many "layers" I have defined. In the image above, I used two of these "layers". That means that when starting from the green cell, I go around it once (blue arrows) and then again in the second layer (red arrows).
Now comes the problem: if I would have started in Square[1,1] (green square) instead of Square[2,2] as in the image below, the second layer (in red) would try to access data on the left side and at the bottom that does not exist (i.e. in the "-1" column and row). See the image below. This problem occurs at all borders of course.
I probably can make exceptions with IF-statements for every scenario, but I was wondering if there are common programming "tricks" that can handle such situations where you try to access data does not exist.
For example, I imagine it would be very handy if I can follow the pattern of the arrows depicted in the first image to access all the neighbouring squares every single time, even if there are non-existing squares. So, looking at the first image, after Square[3,0] you'd go to something like Square[3,-1] etc. and then eventually come back into the "feasible" zone in Square[0,3].
To visit neighborhood, you can use some kind of BFS (breadth-first search).
But for sparse structure (like the last picture shows) it is worth to use some data structure to organize cells in a good way. Perhaps kd-tree is suitable - you add all existing cells in the tree and make range search around given cell to get other cells in its vicinity.
Also look at another spatial data structures (see list at the bottom of kd-tree page).
I'm looking at some new options for displaying a percentage value as a fill in a custom shape. Consider the effect to be similar to a "progress thermometer" in a traditional dashboard UI sense.
Considerations
Goal - a graphic element showing a percentage value for a custom report.
Format - Either a full graphic (or infographic) itself, or part of a PDF via Photoshop/InDesign or even iBooks (as an excuse to use it).
Usage - I'd like the process to be programmatic, for re-use. It needs to be accurate, and I'd like the solution to be somewhat object oriented to apply to other datasets and graphical containers. This rules out hand-drawn charting.
Source data - currently a pivot table in Excel, but I can work with any other host as required.
Shape - is a custom vector shape that will originate from Illustrator/Inkscape. final format as best fits resolution and rendering of the report. I would also be interested in any other generative shape ideas (such as java/javascript).
Fill - I'd like to be able to represent the fill as both an actual percentage of total area (true up), and as a percentage of the vertical scale. I'd imagine this flexibility would also help reuse of the method as a fill value against selected object variables (height, area, whatever).
I know I'm being slightly vague in the programming languages or hosts side of things, but this gives me an opportunity to break out of the usual analytic toolchain and scope out some innovative or new solutions. I'm specifically interested in open source solutions, but I'm very keen to review other current methods you might suggest.
This might be a little open ended for you, but d3.js is very powerful. There might be some useful templates on the site, or you can build your own from the library.
If you limit yourself to shapes where the percentage can be easily converted into a new shape by varying one of the dimensions, then the display part can be covered by creating a second shape based on the first one, and filling in 100% of the second shape.
This obviously works best with simple shapes like squares, rectangles, circles, etc, where it is simple to convert "50% of the area" or "75% of the height" into manipulation of vector nodes.
However, things gets significantly more difficult if you want to support genuinely arbitrary custom shapes. One way to handle that would be to break up a complex "progress bar" into "progress pieces" (e.g. a thermometer bulb that represents 10% of total progress, then a simple bar for the remaining 90%).
As has been mentioned, D3 seems like it would meet your needs - here are some simple examples of what I think you are asking:
Changing the fill color of a distinct shape: http://jsfiddle.net/jsl6906/YCMb8/
Changing the 'fill amount' of a simple shape: http://jsfiddle.net/jsl6906/YCMb8/1/
I am using Silverlight (4) to create an application in (VS 2010). I utilized the ArcGIS API’s for Silverlight to generate the following scenario:
I buffered a polyline to a variable distance.
I then retrieve all but only those polygons that are overlapped by the buffer.
I then intersect the overlapped portions to separate them.
Attaining the separated overlapped portions, I was about to utilize the Area and perimeter service to retrieve the areas of the portions, but realized that this last step would be in the wind.
I have no problem coding the above scenario except; I now realize that step 4 would not be very useful at this point, since I have no way of sharing data between the separated overlapped portions to the original polygons. Imagine if you will; before I separated the overlapped portions from the polygons, they had data tied to them; such as valuationNumber and volume, but after the separation due to the intersection service, the separated portions seems blank with no data. My goal is to have a list highlighting the valuationNumber, volume, and the area of the separated portion.
Something like:
Valuation:
12345678
Volume:
1234/123
Area of Separation (M):
12
Any, and I mean any help would be appreciated.
[copied and pasted my comments from above due to laziness]
Well then, I would suppose I created a work around, I wonder if there is a right way out there though. Anyhow, I did the following: I created a Dictionary Object and populated it with the Attribute values of the original polygon just as they are created. Then, just as the overlapped portions are being created I assigned the attribute values from my Dictionary. So, now the values match up, and all binding works just fine. But hey, if anyone know a better way; I'm all eyes.
In fact, to make matters seem a bit better, I made an improvement on the work around. I create a class with the fields I wanted to be in both original and separated portions. Then added this class as the value parameter of my dictionary object I spoke of earlier, then followed the same procedure. Now I have all the fields being mapped to in XAML working nicely (for now).
How can I wrap shapes around the world, so that a shape is shown more than once at low zoom?
Example:
I draw a polygon over USA.
I zoom out so that I can see two USA's.
I only see one polygon: ( I want to see two!
The map data effectively has 2 USAs. That implies you should actually want 2 polygons, one of which will be hidden most of the time.
Might as well cater for the worst case and treat a single USA as the exception rather than the rule.
You can't.
As others have already pointed out, the fact that, at far zoom levels certain features get repeated on either side of the map is an unwanted but inevitable side-effect of a projected surface that enables continuous scrolling. This has only been an issue in recent versions of the Bing Maps control - the earlier v6.x control prevented the map from panning across the 180th meridian.
I cannot think of any possible reason why you'd ever want to show two USAs, let alone target data to be positioned on each one. So the solution is to modify either the zoom level at which the map is displayed, or the size of the application window in which it is being displayed so that this situation doesn't occur.
I'm using the newest chart control from silverlight toolkit to plot some data. For small cases it works ok, but for bigger samples the X axis labels overlap. It would be no problem if the chart would simply omit some of the values or I could specify to just show every 10th of them ...
I couldn't find any properties providing this behavior. Any ideas?
Assuming this is a Linear axis then you can specify the interval to use via the the Interval property on the axis.
If the axis in question is Category Axis then dropping some labels may not be valuable to the user. One option is to use the LayoutTransfomer to rotate the labels to an angle reducing the width needed for each one. See this Delay Blog on the subject.