我有一个条形图,我希望两个相对的y轴具有相同的原点。这是我的代码:
let _barData={
...
};
let _barOptions={
legend:{
position:'right'
},
annotation: {annotations: _annotations},
scales: {
xAxes: [{gridLines: {display: false}, barThickness : 5, stacked: true, type: 'time',time: {unit: 'month'}}],
yAxes: [
{id:'A', stacked: true, gridLines: {display: false}, ticks: {beginAtZero:true,display: true}},
{id:'B', stacked: true, gridLines: {display: false}, ticks: {beginAtZero:true,display: true,reverse:true}}
]
}
};
new Chart("barChart", {
type: 'bar',
data: _barData,
options: _barOptions
});
我只想取消血统,我该怎么做? 预先感谢。