One X value for multiple lines

2 posts, 0 answers
  1. Dom
    Dom avatar
    18 posts
    Member since:
    May 2011

    Posted 17 Oct 2011 Link to this post

    Would it be possible for me to have a List of :


    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?

  2. Evgenia
    Evgenia avatar
    1437 posts

    Posted 20 Oct 2011 Link to this post

    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,
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top