This is a migrated thread and some comments may be shown as answers.

One X value for multiple lines

1 Answer 36 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Dom
Top achievements
Rank 1
Dom asked on 17 Oct 2011, 10:25 PM
Would it be possible for me to have a List of :

datetime
double[]

So in my list, each object contains a date and a list of points which all share the same datetime.

Or do I have to copy the datetime to each points and separate them completly?

Thanks
Dom

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 20 Oct 2011, 04:40 PM
Hi Dom,

For the purpose you should create new class where the first property is of type DateTime and the second one - an array of doubles. Then you can bind the Chart by following our help topic Nested Collections which are described here.
As another approach I can suggest is that you set your arrays of doubles as datasources per SeriesMapping. This way each of the Series will have independent datasource and they will share one and the same XValues. You can find an example with source code provided here

Kind regards,
Evgenia
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
Chart
Asked by
Dom
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or