有没有任何选项可以只为一个x轴获取高图绘图带



我使用highchart来获取条形图,我在这里使用了绘图带,所以我的要求是我只需要获取一行x轴的绘图带。这里是一个例子。https://jsfiddle.net/z6kug43w/20/

xAxis: {
plotBands: [{
from: 0.4,
to: 0.6,
color: '#fff',                     
zIndex: 3
},
{
from: 1.4,
to: 1.6,
color: '#fff',                     
zIndex: 3
},
{
from: 2.4,
to: 2.6,
color: '#fff',                     
zIndex: 3
},
{
from: 3.4,
to: 3.6,
color: '#fff',                     
zIndex: 3
}],
categories: ["abc (1%)", "abcd (1%)", "abce (1%)", "abcf (1%)", "abcg (1%)", "abch (1%)"],
crosshair: true
},

y轴:{最小值:0,绘图带:[{从:0,至:100,厚度:"2%",颜色:'#D5D5D6'}],标题:{text:'降雨量(mm('}},

请看一下这个自定义插件,它允许您定义plotBands的lowhigh值。

演示:https://jsfiddle.net/BlackLabel/n3okxjug/

xAxis: {
categories: ["abc (1%)", "abcd (1%)", "abce (1%)", "abcf (1%)", "abcg (1%)", "abch (1%)"],
crosshair: true,
plotBands: [{
from: 0.5,
to: 1.5,
color: 'red',
low: '60%',
high: '100%'
}]
},

这是你想要达到的结果吗?

最新更新