Chart.js/test/fixtures/controller.bar/floatBar/data-as-objects.js
Jukka Kurkela 931d686adb Float bars: data as objects (#6739)
Float bars can be specified in object data points
2019-11-15 08:40:45 -05:00

33 lines
535 B
JavaScript

module.exports = {
config: {
type: 'bar',
data: {
labels: ['a', 'b', 'c'],
datasets: [
{
data: [{x: 'b', y: [2, 8]}, {x: 'c', y: [2, 5]}],
backgroundColor: '#ff0000'
},
{
data: [{x: 'a', y: 10}, {x: 'c', y: [6, 10]}],
backgroundColor: '#00ff00'
}
]
},
options: {
legend: false,
title: false,
scales: {
xAxes: [{display: false, stacked: true}],
yAxes: [{display: false, ticks: {min: 0}}]
}
}
},
options: {
canvas: {
height: 256,
width: 512
}
}
};