猿问

Linechart Highchart中的背景列

我必须做一个这样的图

折线图已经创建,带有图例和轴标签。仅缺少列。我不知道该怎么做,你能帮我吗?


ITMISS
浏览 168回答 1
1回答

有只小跳蛙

我在xAxis上使用plotBands创建类似的东西。将其与您的项目混合应该会返回想要的结果。xAxis: {    plotBands: [{            borderColor: 'grey',        borderWidth: 3,        color: '#FCFFC5',        from: Date.UTC(2019, 02, 2),        to: Date.UTC(2019, 02, 4)    }, { // mark the weekend        color: '#FCFFC5',        from: Date.UTC(2019, 02, 9),        to: Date.UTC(2019, 02, 11)    }, { // mark the weekend        color: '#FCFFC5',        from: Date.UTC(2019, 02, 16),        to: Date.UTC(2019, 02, 18)    }, { // mark the weekend        color: '#FCFFC5',        from: Date.UTC(2019, 02, 23),        to: Date.UTC(2019, 02, 25)    }, { // mark the weekend        color: '#FCFFC5',        from: Date.UTC(2019, 02, 30),        to: Date.UTC(2019, 03, 1)    }],    tickInterval: 24 * 3600 * 1000, // one day    type: 'datetime',},
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答