Skip to main content

Custom Scale

Loading
Options

Start From Zero
Max Ticks on Y-axis

Custom Scale(Y-axis)

Source Code
(Live update based on the above Options change)

import { Chart } from 'singledivui';
import 'singledivui/dist/singledivui.min.css';

const options = {
type: "line",
data: {
labels: ["January", "February", "March", "April", "May", "June"],
series: {
points: [15, 9, 25, 18, 31, 25]
}
},
graphSettings: {
yAxis: {
startFromZero: true,
maxTicks: 10
}
}
};

new Chart('#chart-demo', options);