mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
33 lines
619 B
JavaScript
33 lines
619 B
JavaScript
|
module.exports = {
|
||
|
threshold: 0.01,
|
||
|
tolerance: 0.0025,
|
||
|
config: {
|
||
|
type: 'line',
|
||
|
data: {
|
||
|
labels: ['2017', '2018', '2019', '2020', '2025'],
|
||
|
datasets: [{data: [0, 1, 2, 3, 4], fill: false}]
|
||
|
},
|
||
|
options: {
|
||
|
scales: {
|
||
|
x: {
|
||
|
type: 'time',
|
||
|
time: {
|
||
|
parser: 'YYYY',
|
||
|
unit: 'year'
|
||
|
},
|
||
|
ticks: {
|
||
|
source: 'auto',
|
||
|
callback: (tick, index) => index % 2 === 0 ? null : tick,
|
||
|
}
|
||
|
},
|
||
|
y: {
|
||
|
display: false
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
options: {
|
||
|
spriteText: true
|
||
|
}
|
||
|
};
|