Chart.js/test/fixtures/scale.linear/tick-count-data-limits.js
Evert Timberg 1f6d0a244b
Linear Scale: Ability to specify a fixed number of ticks (#8643)
* 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
2021-03-15 08:49:25 -04:00

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
}
};