【发布时间】:2021-01-08 02:10:10
【问题描述】:
上图是我使用下面给出的选项生成的:
Highcharts.chart('container', {
chart: {
type: 'column'
},
title: {
text: 'Browser market shares. January, 2018'
},
subtitle: {
text: 'Click the columns to view versions. Source: <a href="http://statcounter.com" target="_blank">statcounter.com</a>'
},
accessibility: {
announceNewData: {
enabled: true
}
},
xAxis: {
type: 'category'
},
yAxis: {
title: {
text: 'Total percent market share'
}
},
legend: {
enabled: false
},
plotOptions: {
series: {
borderWidth: 0,
dataLabels: {
enabled: true,
format: '{point.y:.1f}%'
}
}
},
tooltip: {
headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
},
series: [
{name: "Data A", data: [4], _colorIndex: 0},
{name: "Data B", data: [7], _colorIndex: 1},
{name: "Data C", data: [9], _colorIndex: 2},
{name: "Data D", data: [19], _colorIndex: 3}
]
});
目前,问题是生成的列自动堆叠在中间。我的要求是,它必须从头到尾沿 x 轴均匀分布。有什么可用的选项吗?任何帮助将不胜感激。
【问题讨论】:
标签: highcharts bar-chart