mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-09 05:39:06 +02:00
45 lines
1.2 KiB
JSON
45 lines
1.2 KiB
JSON
|
{
|
||
|
"config": {
|
||
|
"type": "bar",
|
||
|
"data": {
|
||
|
"datasets": [{
|
||
|
"backgroundColor": "#FF6384",
|
||
|
"barPercentage": 1,
|
||
|
"categoryPercentage": 1,
|
||
|
"data": [{"x": "2001", "y": 1}, {"x": "2099", "y": 5}]
|
||
|
}, {
|
||
|
"backgroundColor": "#8463FF",
|
||
|
"barPercentage": 1,
|
||
|
"categoryPercentage": 1,
|
||
|
"data": [{"x": "2019", "y": 2}, {"x": "2020", "y": 3}]
|
||
|
}]
|
||
|
},
|
||
|
"options": {
|
||
|
"responsive": false,
|
||
|
"legend": false,
|
||
|
"title": false,
|
||
|
"scales": {
|
||
|
"x": {
|
||
|
"type": "time",
|
||
|
"display": false,
|
||
|
"min": "2000",
|
||
|
"max": "2100",
|
||
|
"time": {
|
||
|
"parser": "YYYY"
|
||
|
}
|
||
|
},
|
||
|
"y": {
|
||
|
"display": false,
|
||
|
"beginAtZero": true
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"options": {
|
||
|
"canvas": {
|
||
|
"height": 256,
|
||
|
"width": 512
|
||
|
}
|
||
|
}
|
||
|
}
|