chart js min x axis code example
Example 1: chart.js y axis maximum value
var options = {
scales: {
yAxes: [{
display: true,
ticks: {
beginAtZero: true, // minimum value will be 0.
// <=> //
min: 0,
max: 10,
stepSize: 1 // 1 - 2 - 3 ...
}
}]
}
};
Example 2: chart js x axis data bar
data: {
datasets: [{
barPercentage: 0.5,
barThickness: 6,
maxBarThickness: 8,
minBarLength: 2,
data: [10, 20, 30, 40, 50, 60, 70]
}]
};