Multiple series not overlapping properly

3 posts, 1 answers
  1. Matt Dufrasne
    Matt Dufrasne avatar
    23 posts
    Member since:
    Aug 2009

    Posted 10 Sep 2014 Link to this post

    I have a data source that is grouped to create a multi-series line chart.  The category axis values for each series do not include all values seen in all other series, so I am using the series' "categoryField" property instead of the categoryAxis' "field" property.  

    I want to toggle between two types of information for the category axis.  When the category axis is set to display date information, everything displays nicely.  However when the category axis is switched to display a different type of information, the series are not plotted over-top of each other but instead side by side.  This is in spite of the fact that the category axis values should be intermixed between the series.

    See my example here:

    When the Id toggle is clicked, the series are sorted by Id within each series, but the overall axis data is side by side (and not in sorted order), unless both series happen to have data for the same Id number.  How can I get the series to plot as nicely for Id as they do for Date?
  2. Answer
    T. Tsonev
    T. Tsonev avatar
    2794 posts

    Posted 12 Sep 2014 Link to this post


    I'm not quite sure why the data source sorting is not getting applied correctly. Perhaps the chart responds to the change event sooner than we manage to apply the new settings.
    In any case, doing the sorting in the dataBound event seems to help:
    dataBound: function(e) {

    I hope this helps.

    T. Tsonev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Matt Dufrasne
    Matt Dufrasne avatar
    23 posts
    Member since:
    Aug 2009

    Posted 12 Sep 2014 in reply to T. Tsonev Link to this post

    That works, thanks!
Back to Top