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
43 lines
1.1 KiB
JSON
43 lines
1.1 KiB
JSON
{
|
|
"config": {
|
|
"type": "bar",
|
|
"data": {
|
|
"labels": ["2030", "2034", "2038", "2042"],
|
|
"datasets": [{
|
|
"backgroundColor": "#FF6384",
|
|
"data": [11, [6,2], [-4,-7], -2]
|
|
}, {
|
|
"backgroundColor": "#36A2EB",
|
|
"data": [[1,2], [3,4], [-2,-3], [1,4]]
|
|
}, {
|
|
"backgroundColor": "#FFCE56",
|
|
"data": [[0,1], [1,2], [-2,-1], [1,-7]]
|
|
}]
|
|
},
|
|
"options": {
|
|
"title": false,
|
|
"legend": false,
|
|
"indexAxis": "y",
|
|
"scales": {
|
|
"x": {
|
|
"display": false,
|
|
"stacked": true
|
|
},
|
|
"y": {
|
|
"display": false,
|
|
"stacked": true,
|
|
"min": -8,
|
|
"max": 12
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"debug": false,
|
|
"options": {
|
|
"canvas": {
|
|
"height": 256,
|
|
"width": 512
|
|
}
|
|
}
|
|
}
|