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

line chart missing category labels multiple series

3 Answers 155 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Gabriel
Top achievements
Rank 1
Gabriel asked on 19 Jan 2015, 10:54 PM
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. 

3 Answers, 1 is accepted

Sort by
0
Gabriel
Top achievements
Rank 1
answered on 19 Jan 2015, 10:58 PM
also this is the javascript for the chart if it helps.
0
Accepted
Iliana Dyankova
Telerik team
answered on 21 Jan 2015, 09:58 AM
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!
 
0
Gabriel
Top achievements
Rank 1
answered on 21 Jan 2015, 09:52 PM
Thanks that worked perfectly!
Tags
Charts
Asked by
Gabriel
Top achievements
Rank 1
Answers by
Gabriel
Top achievements
Rank 1
Iliana Dyankova
Telerik team
Share this question
or