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
81 lines
2.4 KiB
JSON
81 lines
2.4 KiB
JSON
{
|
|
"config": {
|
|
"type": "bar",
|
|
"data": {
|
|
"labels": ["January", "February", "March", "April", "May", "June", "July"],
|
|
"datasets": []
|
|
},
|
|
"options": {
|
|
"legend": false,
|
|
"title": false,
|
|
"indexAxis": "y",
|
|
"scales": {
|
|
"x": {
|
|
"type": "category",
|
|
"position": "top",
|
|
"id": "x-axis-1",
|
|
"ticks": {
|
|
"display": false
|
|
},
|
|
"gridLines":{
|
|
"drawOnChartArea": false,
|
|
"drawBorder": false,
|
|
"color": "rgba(0, 0, 0, 1)"
|
|
}
|
|
},
|
|
"x2": {
|
|
"type": "category",
|
|
"position": "bottom",
|
|
"ticks": {
|
|
"display": false
|
|
},
|
|
"gridLines":{
|
|
"drawOnChartArea": false,
|
|
"drawBorder": false,
|
|
"color": "rgba(0, 0, 0, 1)"
|
|
}
|
|
},
|
|
"y": {
|
|
"position": "left",
|
|
"id": "y-axis-1",
|
|
"type": "linear",
|
|
"offset": false,
|
|
"min": -100,
|
|
"max": 100,
|
|
"ticks": {
|
|
"display": false
|
|
},
|
|
"gridLines":{
|
|
"offsetGridLines": false,
|
|
"drawOnChartArea": false,
|
|
"drawBorder": false,
|
|
"color": "rgba(0, 0, 0, 1)"
|
|
}
|
|
},
|
|
"y2": {
|
|
"type": "linear",
|
|
"position": "right",
|
|
"offset": false,
|
|
"min": 0,
|
|
"max": 50,
|
|
"ticks": {
|
|
"display": false
|
|
},
|
|
"gridLines":{
|
|
"offsetGridLines": false,
|
|
"drawOnChartArea": false,
|
|
"drawBorder": false,
|
|
"color": "rgba(0, 0, 0, 1)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"options": {
|
|
"canvas": {
|
|
"height": 256,
|
|
"width": 512
|
|
}
|
|
}
|
|
}
|