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

Limiting number of labels in categoryAxis

3 Answers 98 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 11 Apr 2014, 07:45 PM
I have a chart that is able to be filtered by date. I would like to always display 3-5 labels in the categoryAxis, that shows the start date, end date and a few points along the way to assist the user in identifying the data. I have only seen that you can step the labels and display on the nth one, however, my data set varies in size based on the date range, meaning a different set and number of labels is displayed based on the query. Is there any way to fix the number of labels that show and to have them do a min, max, median?

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 15 Apr 2014, 08:33 AM
Hi Chris,

This scenario is not supported by Kendo UI Chart and there is no a suitable workaround I can suggest. Please accept my apologies for any inconvenience this may cause.

Regards,
Iliana Nikolova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
grex
Top achievements
Rank 1
answered on 28 Aug 2015, 12:36 PM

Hi, 

 I'd like to know if there is a solution for this problem in the latest versions of KendoUI. As the original post, we need to show the dates every n points in the X axis, but we don't know how how my points there will be in that axis so we would need to know the max in advance to set the step parameter.

 

Thanks.

0
Iliana Nikolova
Telerik team
answered on 01 Sep 2015, 10:51 AM
Hi Fernando,

You could get the number of categories via the internal _plotArea option:
// get reference to the chart widget
var chart = $("#chart").data("kendoChart");
// get the categories length
chart._plotArea.categoryAxis.children.length


Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Chris
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
grex
Top achievements
Rank 1
Share this question
or