Value axis minimum interval

2 posts, 0 answers
  1. Hans
    Hans  avatar
    5 posts
    Member since:
    Jun 2012

    Posted 30 May 2013 Link to this post

    I would like to set a minimum interval for the value axis in a chart because values with decimals don't make sense in this instance (you can't have half of a working chair, for instance).

    I tried using valueAxis.labels.format = "n0". However, in an empty grid (which automatically scales to a max of 1.2) this rounds values such as 0.4 down to 0 and values such as 0.6 up to 1 (I've attached a screenshot of what this looks like). I was hoping that any scale value that had a decimal part would not be displayed at all.

    Is there any way for me to accomplish this? Other requirements are that I can't set a hard max on the value axis as I need the graph to be dynamically scalable on that axis.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 31 May 2013 Link to this post

    Hi Hans,

    You could achieve the desired result as setting valueAxis.majorUnit. As an example 
    $("#chart").kendoChart({
      //....
      valueAxis: {
         //....
         majorUnit: 1,
      }
    });
    I hope this information helps.
     
    Regards,
    Iliana Nikolova
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top