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

Value axis minimum interval

1 Answer 109 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Edzel
Top achievements
Rank 1
Edzel asked on 31 May 2013, 12:08 AM
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.

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 31 May 2013, 01:51 PM
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!
Tags
Charts
Asked by
Edzel
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or