I have several series all using independent x axis but I have had to add code to make sure they are all showing the exact same range. Is it not possible to have them all share the same x axis? Each time I add a series I tried simply finding the current CategoryDateTimeXAxis and setting it to the series's xaxis but the axis labels are never displayed.
Is there an example of adding a CategoryDateTimeXAxis to the xaml and then programmatically adding the a series which uses that CategoryDateTimeXAxis?
For CategoryDateTimeXAxis, you should currently use a seperate DateTimeXAxis per series and set each axis' MinimumValue and MaximumValue equal to the same range (the full range).
For CategoryXAxis, see:
https://ko.infragistics.com/community/forums/f/retired-products-and-controls/65585/lineseries-and-xaxis-how-to-show-the-biggest-values-in-the-xaxis-when-i-have-multiple-series/332992#332992
-Graham
Hello, I am getting the same Issue in silverlight with XAMDATACHART and lineseries
I want to display different series with a date in X axis and Double Value in Y axis.
When I display them if they are not in the same range of X values, the series disappear.
Example with CategoryDateTimeXAxis:
Serie 1 goes from 1/1/2000 to 1/1/2010
Serie 2 goes from 1/1/2001 to 1/1/2002
Serie 3 goes from 1/1/2001 to 1/1/2002
Serie 2 and three are displayed, instead of showing dates from 1/1/2000 to 1/1/2010 and showing the three series.
Example with CategoryAxis:
It will display the three series but in the range of the last one given to the item source of X axis. The problem is that the first value for the X axis (due to the label) should be 1/1/2001 and for the series 2 and 3 everything goes Ok, but for the first one, in the line the values start at 1/1/2000, that means that is displayed from the beginning without having a relationship with the X axis values. In addition, the chart will only display data samples from 1/1/2001 to 1/1/2002, so I will be missing al the data outside that one year period
Hi Francis Khoury,
This is nice sample, and working too, we have an issue that we have to add N series with different dates. I have tried it on your provided sample too but it is not working and shows the chart for first series only, can you help us resolve this issue?
Thanks
Thanks for the suggestion.
I ended up using plain line series with markers but with a null brush so that the line is not visible, just markers. Does almost exactly what I need.
The issue with mixed x axis is (as you've noticed) conversion of datetime and/or numeric values, I simply didn't want to go there.
But it's nice to know that the possibility exists.
I had a similar requirement and ended up using both Numeric and CategoryDateTime axes. I used 2 series. One is a Stepline which has to use a Category axis and the other is a Scatterline which has to use the Numeric axis. All I did was set the two axis to the same min/max value and for the Numeric axis convert the DateTime to ticks before I set it as the data member. This allows me to draw my stepline with 10s of thousands of points and then add on the occational marker.