Chart.js/test/fixtures/controller.bar/floatBar/data-as-objects-horizontal.js
Jukka Kurkela 59a1af91ac
Replace horizontalBar with indexAxis: 'y' (#7514)
* Replace horizontalBar with indexAxis: 'y'
* Fix drawing of line for last x-position
* Consistently determine axis of scale
* Add test
2020-06-18 17:35:52 -04:00

34 lines
533 B
JavaScript

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