xAxis.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 xAxis.type is set to "log"
, the majorUnit value will be used for the base of the logarithm.
Example - set the scatter chart x axis major unit
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
type: "scatter",
data: [[1, 1],[2, 2]]
}],
xAxis: {
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: [[new Date(2012, 0, 1), 1],[new Date(2012, 0, 10), 2]]
}],
xAxis: {
baseUnit: "days",
majorUnit: 5
}
});
</script>
Example - set the base for a logarithmic x axis
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
type: "scatterLine",
data: [[5, 1], [8, 2], [1024, 3]]
}],
xAxis: {
type: "log",
majorUnit: 2
}
});
</script>