如何将绘图线值扩展到灰色区域之外或高图中的图表之外



如何使用highchart将绘图线与值一起扩展到灰色背景之外或图表区域之外。演示:https://jsfiddle.net/mncfy80p/

想要自定义如下图所示的图表。https://i.stack.imgur.com/xbHGh.pngenter code here

您可以增加xAxis占用的空间,并使用plotBands而不是plotBackgroundColor属性。

xAxis: {
labels: {
enabled: false
},
lineWidth: 0,
tickLength: 0,
max: 3,
plotBands: [{
color: "#D3D3D3",
from: -1,
to: 2.5
}]
}

现场演示:https://jsfiddle.net/BlackLabel/7jcqek36/

API参考:https://api.highcharts.com/highcharts/xAxis.plotBands

最新更新