Chart.js/test/fixtures/controller.bar/chart-area-clip.js
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

43 lines
576 B
JavaScript

module.exports = {
config: {
type: 'bar',
data: {
labels: [0, 1, 3, 4],
datasets: [
{
data: [5, 20, -5, -20],
borderColor: '#ff0000'
}
]
},
options: {
legend: false,
title: false,
layout: {
padding: {
left: 0,
right: 0,
top: 50,
bottom: 50
}
},
elements: {
rectangle: {
backgroundColor: '#00ff00',
borderWidth: 8
}
},
scales: {
x: {display: false},
y: {display: false, min: -10, max: 10}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};