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

kendoStockChart label problem

1 Answer 44 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 15 Apr 2013, 01:41 PM
Hello,

We need advice for 2 changes at kendoStockChart, see attachment:
- we don't know how to change the number of displayed (visible) labels. For example we have chart with date values from 2005 to 2012 and we want to show only 2004, 2009 and 2012 values. Not all years. Is it possible?

- we don't know how to change formatting of displayed labels. We have same chart as above with years formatted as 2005 and would like to change to '05 format. 

Any advice please?

Thank you

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 17 Apr 2013, 08:54 AM
Hi Martin,

If I understand you correctly you would like to customize the labels of the Navigator itself (rounded labels from the picture)? In order to achieve the first requirement you can use the step property. For example: 
//get reference to the StockChart
var stockchart = $("#stock-chart").data("kendoStockChart");
//get the Navigator
var navigator = stockchart.options.categoryAxis[2];
//set the Navigator' labels step
navigator.labels.step = 3;
//refresh the Chart
stockchart.refresh();
Regarding the labels' format, I am afraid this is not supported and there is no suitable workaround I can suggest.

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