mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
1f6d0a244b
* Option to specify exact number of ticks on linear scale * Fix issue description in tests * Add tests for conditions where min/max do not align with niceMin/niceMax * Refactor linear tick generation algorithm * Add TS definitions * Update docs * Code review feedback + lint fixes
29 lines
487 B
JavaScript
29 lines
487 B
JavaScript
module.exports = {
|
|
description: 'https://github.com/chartjs/Chart.js/issues/4234',
|
|
config: {
|
|
type: 'line',
|
|
data: {
|
|
datasets: [{
|
|
data: [0, 2, 45, 30]
|
|
}],
|
|
labels: ['A', 'B', 'C', 'D']
|
|
},
|
|
options: {
|
|
scales: {
|
|
y: {
|
|
ticks: {
|
|
count: 21,
|
|
callback: (v) => v.toString(),
|
|
}
|
|
},
|
|
x: {
|
|
display: false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
options: {
|
|
spriteText: true
|
|
}
|
|
};
|