Chart.js/test/fixtures/controller.line/stacking/order-default.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

46 lines
668 B
JavaScript

module.exports = {
config: {
type: 'line',
data: {
labels: [0, 1, 2, 3, 4, 5],
datasets: [
{
// option in dataset
data: [3, 1, 2, 0, 8, 1],
backgroundColor: '#ff0000'
},
{
// option in element (fallback)
data: [0, 4, 2, 6, 4, 8],
backgroundColor: '#00ff00'
}
]
},
options: {
legend: false,
title: false,
elements: {
line: {
fill: true
},
point: {
radius: 0
}
},
layout: {
padding: 32
},
scales: {
x: {stacked: true, display: false},
y: {stacked: true, display: false}
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};