设置yAxis的y值后,其余的条不会出现。 例如。在代码中,我将y值设置为20,但是20之后没有任何值。所以我想做的是将所有行扩展到最大值,并保持20。
屏幕截图
Highcharts.chart("container1", {
chart: {
marginTop: 40
},
title: {
text: "Gauge Bar Chart"
},
xAxis: {
categories: [
'<span class="hc-cat-title">Revenue</span><br/>U.S. $ (1,000s)'
]
},
yAxis: {
plotBands: [
{
from: 0,
to: 1400,
color: "#ffffff"
}
],
labels: {
format: "{value}%"
},
title: null,
max: 100,
visible: true
},
series: [
{
animation: false,
data: [
{
y: 20,
target: 40
}
]
}
],
答案 0 :(得分:0)
您可以将plotBands
添加到所有xAxis
中,例如:
xAxis: {
...,
plotBands: [{
from: -0.18,
to: 0.15,
color: "gray"
}]
},