如果这些图表之一在 XAxis 上包含多个值(例如“数据”:[[52,1],[100,1]]),则它们之间的距离越大,列就越大。如何摆脱这个问题?
$(function () {
$('#container').highcharts({
chart: {
type: 'column',
},
xAxis: {
title: {
text: 'value'
}
},
yAxis: {
min: 0,
},
legend: {
},
tooltip: {
},
plotOptions: {
column: {
stacking: 'normal',
}
},
series: [{"name":"RunContractid = 316 name","stack":109,"data":[[52,1], [100,1]],"type":"column"},{"name":"RunContractid = 314 name","stack":109,"data":[[49,1]],"type":"column"},{"name":"RunContractid = 472 name","stack":109,"data":[[49,1]],"type":"column"},{"name":"RunContractid = 327 name","stack":109,"data":[[49,1]],"type":"column"},{"name":"RunContractid = 476 name","stack":109,"data":[[52,1]],"type":"column"},{"name":"RunContractid = 299 name","stack":109,"data":[[52,1]],"type":"column"},{"name":"RunContractid = 298 name","stack":109,"data":[[52,1]],"type":"column"},{"name":"RunContractid = 469 name","stack":109,"data":[[56,1]],"type":"column"},{"name":"RunContractid = 479 name","stack":109,"data":[[56,1]],"type":"column"},{"name":"RunContractid = 500 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"RunContractid = 320 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"RunContractid = 600 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"RunContractid = 326 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"RunContractid = 642 name","stack":109,"data":[[59,1]],"type":"column"},{"name":"RunContractid = 312 name","stack":109,"data":[[64,1]],"type":"column"},{"name":"RunContractid = 480 name","stack":109,"data":[[48,1]],"type":"column"}]
});
});
找到解决方案 - 在空白点添加零。