mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-09 05:39:06 +02:00
ce74eb76a1
* Convert axis options from arrays to objects * Updated all chart type defaults * Throw errors when axis type or position are not specified * Avoid raising unnecessary errors when merging options into the default configs * Fix additional tests * Ensure scale defaults are set if type is not explicitly defined * Another step * Include `scale` as `firstIDs.r` * update docs * Update for buildOrUpdateScales * Update migration guide * Add test back
44 lines
1.1 KiB
JSON
44 lines
1.1 KiB
JSON
{
|
|
"config": {
|
|
"type": "bar",
|
|
"data": {
|
|
"labels": ["2016", "2018", "2020", "2024", "2030"],
|
|
"datasets": [{
|
|
"backgroundColor": "#FF6384",
|
|
"barPercentage": 1,
|
|
"categoryPercentage": 1,
|
|
"maxBarThickness": 8,
|
|
"data": [1, null, 3, 4, 5]
|
|
}]
|
|
},
|
|
"options": {
|
|
"responsive": false,
|
|
"legend": false,
|
|
"title": false,
|
|
"scales": {
|
|
"x": {
|
|
"type": "time",
|
|
"display": false,
|
|
"offset": false,
|
|
"time": {
|
|
"parser": "YYYY"
|
|
},
|
|
"ticks": {
|
|
"source": "labels"
|
|
}
|
|
},
|
|
"y": {
|
|
"display": false,
|
|
"beginAtZero": true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"options": {
|
|
"canvas": {
|
|
"height": 256,
|
|
"width": 512
|
|
}
|
|
}
|
|
}
|