如何使用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