Chart.js/test/fixtures/controller.bar/bar-thickness-no-overlap.json
Jukka Kurkela ce74eb76a1 Convert axis options from arrays to objects (#6773)
* 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
2019-11-21 18:46:49 -05:00

53 lines
1.4 KiB
JSON

{
"config": {
"type": "bar",
"data": {
"labels": ["2016", "2018", "2020", "2024", "2030"],
"datasets": [{
"backgroundColor": "#FF6384",
"data": [
{"y": "1", "t": "2016"},
{"y": "2", "t": "2017"},
{"y": "3", "t": "2017-08"},
{"y": "4", "t": "2024"},
{"y": "5", "t": "2030"}
]
}]
},
"options": {
"responsive": false,
"legend": false,
"title": false,
"datasets": {
"bar": {
"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
}
}
}