mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-09 05:39:06 +02:00
59a1af91ac
* Replace horizontalBar with indexAxis: 'y' * Fix drawing of line for last x-position * Consistently determine axis of scale * Add test
42 lines
573 B
JavaScript
42 lines
573 B
JavaScript
module.exports = {
|
|
config: {
|
|
data: {
|
|
datasets: [
|
|
{
|
|
type: 'line',
|
|
data: [6, 16, 3, 19],
|
|
borderColor: '#0000ff',
|
|
fill: false
|
|
},
|
|
{
|
|
type: 'bar',
|
|
data: [5, 20, 1, 10],
|
|
backgroundColor: '#00ff00',
|
|
borderColor: '#ff0000'
|
|
}
|
|
]
|
|
},
|
|
options: {
|
|
indexAxis: 'y',
|
|
legend: false,
|
|
title: false,
|
|
scales: {
|
|
horz: {
|
|
position: 'top'
|
|
},
|
|
vert: {
|
|
axis: 'y',
|
|
labels: ['a', 'b', 'c', 'd']
|
|
}
|
|
}
|
|
}
|
|
},
|
|
options: {
|
|
spriteText: true,
|
|
canvas: {
|
|
height: 256,
|
|
width: 512
|
|
}
|
|
}
|
|
};
|