我尝试在Google图表中自定义垂直轴的最大值和最小值,但没有任何变化。 我遵循https://developers.google.com/chart/interactive/docs/gallery/combochart
的引用var data = new google.visualization.DataTable();
data.addColumn('string', 'Date');
data.addColumn('number', '実績(件数)');
data.addColumn('number', '体調');
data.addRows([['03/19',2,5],['03/20',3,4],['03/21',3,3]]);
var materialOptions = {
seriesType: 'bars',
interpolateNulls: true,
series: {
0: {axis: '実績(件数)'},
1: {axis: '体調', targetAxisIndex:1, type:'line'}
},
height: 400,
vAxis: {
0: {
minValue: 0,
maxValue: 5.5
},
1: {
minValue: 1,
maxValue: 6
}
}
};
var materialChart = new google.visualization.ComboChart(chartDiv);
materialChart.draw(data, materialOptions);
答案 0 :(得分:0)
我添加了isStacked:像波纹管一样真实
vAxis: { minValue: 0, maxValue: 5.5 }
isStacked: true,