在 Highcharts 折线图中渲染 from/to 个区域

Render from/to areas in Highcharts line chart

我试图在 Highcharts 中实现具有 from/to 个区域的折线图。例如,在下图中,您可以看到两个 from/to 灰色区域(分别为 2001 年 1 月/2001 年 12 月和 2007 年 12 月/2009 年 3 月)。这可以在 Highcharts 中完成吗?

是的,可以通过plotBands添加。

xAxis: {
        plotBands: [{
            color: '#FCFFC5',
            from: 4.5,
            to: 7.5
        }]
},