Hello,
I'm struggling with showing multiple lineseries in the same x-axis. Is this possible?
Can someone point me to an example?
P
Hello Peratle,
Thank you for your post. I have been looking into it and I have created a sample application for your that demonstrates how you can create multiple LineSeries that use shared CategoryXAxis. I have added 4 series to the XamDataChart and all the series uses one x axis and several y axis.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Krasimir,
In your example I see example only for one data collection with several properties for data series.
But what do you say about 4 different collection of object, like this
public class Measurement { public DateTime TimeStamp { get; set; } public double Value { get; set; } }
And ObservableCollection<ObservableCollection<Measurement>> DataPoints as a data source for binding?
Now I have a problem: all 4 line series draws on the charts but starting point of each line series is located on left chart border.
If you are using CategoryXAxis, see this post: http://ko.infragistics.com/community/forums/p/38082/220246.aspx
It is for our older chart control but provides context about why the chart expects aligned data. You can provide a seperate data source for each series individually if you desire, but the chart expects to see the same categories in the same order and will not attempt to align and reorder the categories for you. It would not even be inexpensive for the chart to check if alignment was required, let alone hash join the data for you.
There are various strategies you can use to align the data if it is not aligned prior to display. See the above for one way. Doing this thing in code may be innapropriate though, as if you are pulling your data from some sort of RDBMS it likely has the indices to perform this alignment for your much more efficiently, with, say, an outer join.
If you would liike for some sort of alignment adapter to be built into the chart library, that you could optionally feed your data through, please make a feature request to this effect.
If you would like your data displayed in a true "date time" fashion where if there is 1 day between two data points, and 2 years between the next two then the spaces between are different, then you could use the CategoryDateTimeXAxis rather than the CategoryXAxis.
Since the CategoryDateTimeXAxis just fits things on a linear scale you wouldn't need to account for any missing data values in the other series, but you would need a seperate CategoryDateTimeXAxis for each series and to syncrhonize their MinimumValue and MaximumValue, please see:
http://ko.infragistics.com/community/forums/t/72339.aspx
Thanks a lot for your explanation.
I found helpfull links and solution by this links for my chart features
http://ko.infragistics.com/community/forums/p/66321/340790.aspx
http://ko.infragistics.com/community/forums/p/67174/339922.aspx