mirror of
https://github.com/chartjs/Chart.js.git
synced 2025-12-08 20:36:08 +00:00
42 lines
755 B
JavaScript
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
|
|
}
|
|
}
|
|
};
|