I'm currently working in xamDataChart with several kinds of series. Currently I'm trying to graph an area under LineSeries. I'm using a RangeAreaSeries to get under the line, but there's a problem - it creates the area, but at the start of the category. Not under the line where I intend! I've tried using a custom RangeAreaSeries - per http://es.infragistics.com/community/forums/p/78639/397717.aspx#397717 but it doesn't seem to work, as the first block is always at the beginning. So I'm poking out here for some advice on how to get this thing to work! Thanks!
Hi Collin,
I created a chart sample using multiple series, LineSeries and RangeAreaSeries that shared a common NumericYAxis. Then the RangeAreaSeries' HighMemberPath and the LineSeries' ValueMemberPath pointed to the same property. That caused the line to show at the top of the RangeArea.
I'll attach my sample so you can see what I did. It's a much more simple approach then the Custom RangeAreaSeries described in Krasimir's post but it may serve your purposes.
Please let me know if you have additional questions.
Hello Marianne, that solution works if the intent is that the area under the line is to extend the entire length of the chart. That is not the case here. As an example, if we had a line series with data points from 1 to 100, the area under the line plotted would only be from, say, 26 to 50. This would leave blanks before and after. That is what I am trying to accomplish. I apologize if I wasn't clear enough.
I'm going to assume that you are using unique properties for the rangearea’s HighMemberPath and the line series, otherwise there wouldn't be gaps. Also I’m assuming that the values for the line series and the rangearea are consistent except that for some items the rangearea property is not valued at all.
I’ll return my updated sample where I add a property, so that there is now Coal and a XCoal property. These two properties have the same values for most items, except for when the Coal value is double.NaN.
In the xaml, I then updated the ValueMemberPath to XCoal for the LineSeries.
The line series is continuous and the rangeAreaSeries, below the line, is missing for the appropriate countries, at the beginning and end of the line series.
Please let me know if this provides a solution for you.
I don’t know if you’ve had the opportunity to review my last sample.
Please let me know if there is anything further that I can help you with regarding this question?
In my sample the range is valued between low value (Nuclear) and high value (Coal) for each country. When you make one of those values double.NaN the range doesn’t show. I reversed the values setting Nuclear to double.NaN and also tested setting both Nuclear and Coal to double.NaN for a country. In both cases no range appears for the appropriate country.
I perhaps misunderstood you but the range doesn’t show where the value of the high and/or the low value is set to double.NaN.
Please let me know if you are not able to create the range chart that you need or if you have any questions.
Sorry for the delay - I have been travelling.
I had attempted Double.NaN on both high and low, but it seemed to not work. So then, one of the values would have to be something for this to work, to clarify?