mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-09 05:39:06 +02:00
40871b0062
* Parse from custom properties in data * Resolve CC issues * Review update
53 lines
1.4 KiB
JSON
53 lines
1.4 KiB
JSON
{
|
|
"config": {
|
|
"type": "bar",
|
|
"data": {
|
|
"labels": ["2016", "2018", "2020", "2024", "2030"],
|
|
"datasets": [{
|
|
"backgroundColor": "#FF6384",
|
|
"data": [
|
|
{"y": "1", "x": "2016"},
|
|
{"y": "2", "x": "2017"},
|
|
{"y": "3", "x": "2017-08"},
|
|
{"y": "4", "x": "2024"},
|
|
{"y": "5", "x": "2030"}
|
|
]
|
|
}]
|
|
},
|
|
"options": {
|
|
"responsive": false,
|
|
"legend": false,
|
|
"title": false,
|
|
"bar": {
|
|
"datasets": {
|
|
"barPercentage": 1,
|
|
"categoryPercentage": 1
|
|
}
|
|
},
|
|
"scales": {
|
|
"x": {
|
|
"type": "time",
|
|
"display": false,
|
|
"offset": false,
|
|
"time": {
|
|
"parser": "YYYY-MM"
|
|
},
|
|
"ticks": {
|
|
"source": "labels"
|
|
}
|
|
},
|
|
"y": {
|
|
"display": false,
|
|
"beginAtZero": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"options": {
|
|
"canvas": {
|
|
"height": 256,
|
|
"width": 512
|
|
}
|
|
}
|
|
}
|