Edit this page

yAxis.majorUnit Number

The interval between major divisions. If this is a date axis the value represents the number of xAxis.baseUnits between major divisions. If the yAxis.type is set to "log", the majorUnit value will be used for the base of the logarithm.

Example - set the scatter chart y axis major unit

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatter",
    data: [[1, 1],[2, 2]]
  }],
  yAxis: {
    majorUnit: 1
  }
});
</script>

Example - set both the baseUnit and major unit for a date axis

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatterLine",
    data: [[1, new Date(2012, 0, 1)],[2, new Date(2012, 0, 10)]]
  }],
  yAxis: {
    baseUnit: "days",
    majorUnit: 5
  }
});
</script>

Example - set the base for a logarithmic y axis

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [{
    type: "scatterLine",
    data: [[1, 5], [2, 8], [3, 1024]]
  }],
  yAxis: {
    type: "log",
    majorUnit: 2
  }
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy