Jukka Kurkela 420aa027b3
Exclude base-line from bar size (#8648)
* Exclude base-line from bar size

* lint

* add to types
2021-03-16 08:49:19 -04:00

42 lines
755 B
JavaScript

module.exports = {
config: {
type: 'bar',
data: {
labels: ['a', 'b'],
datasets: [{
backgroundColor: '#AAFFCC',
borderColor: '#0000FF',
borderWidth: 1,
data: [1, 2]
}]
},
options: {
indexAxis: 'y',
scales: {
y: {
display: false
},
x: {
ticks: {
display: false
},
grid: {
color: function(context) {
return context.tick.value === 0 ? 'red' : 'transparent';
},
lineWidth: 5,
tickLength: 0
},
}
},
maintainAspectRatio: false
}
},
options: {
canvas: {
width: 128,
height: 128
}
}
};