kendoStockChart label problem

2 posts, 0 answers
  1. Martin
    Martin avatar
    1 posts
    Member since:
    Apr 2013

    Posted 15 Apr 2013 Link to this post


    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
  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 17 Apr 2013 Link to this post

    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
    Regarding the labels' format, I am afraid this is not supported and there is no suitable workaround I can suggest.

    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!
Back to Top