line chart missing category labels multiple series

4 posts, 1 answers
  1. Gabriel
    Gabriel avatar
    3 posts
    Member since:
    May 2013

    Posted 19 Jan 2015 Link to this post

    Hi,

    In the attached chart I have multiple dynamic line series on the chart which last for varying periods of time however the category axis seems to be generating it's values from the very first data point, so if the first one only lasts for one month then that's all the category axis will represent even though the other lines last for longer. Is there a way to get the category axis to generate its labels dependent on the longest line rather than the first?

    Thanks. 
  2. Gabriel
    Gabriel avatar
    3 posts
    Member since:
    May 2013

    Posted 19 Jan 2015 Link to this post

    also this is the javascript for the chart if it helps.
  3. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 21 Jan 2015 Link to this post

    Hi Gabriel,

    In order to achieve the expected result you should use series.categoryField insted of categoryAxis.field
    $("#newLineSpeedToMarketChart").kendoChart({
      //....
      series: [{
         type: "line",
         field: "Value",
         categoryField: "CategoryName",
         name: "#= group.value #"
      }]
    });

    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  4. Gabriel
    Gabriel avatar
    3 posts
    Member since:
    May 2013

    Posted 21 Jan 2015 in reply to Iliana Nikolova Link to this post

    Thanks that worked perfectly!
Back to Top