Limiting number of labels in categoryAxis

4 posts, 0 answers
  1. Chris
    Chris avatar
    7 posts
    Member since:
    Mar 2014

    Posted 11 Apr 2014 Link to this post

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

    Posted 15 Apr 2014 Link to this post

    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.

    Iliana Nikolova

    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.

  3. Kendo UI is VS 2017 Ready
  4. grex
    grex avatar
    3 posts
    Member since:
    Nov 2014

    Posted 28 Aug 2015 Link to this post


     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.



  5. Iliana Nikolova
    Iliana Nikolova avatar
    2595 posts

    Posted 01 Sep 2015 Link to this post

    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

    Iliana Nikolova
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready