How to draw a vertical line on HighCharts?

前端 未结 1 812
盖世英雄少女心
盖世英雄少女心 2021-02-02 06:57

I want to trace a vertical time line on the current day, but I didn\'t found solution on HighCharts documentation.

Like this :

相关标签:
1条回答
  • 2021-02-02 07:48

    You're looking for a plot line. See the documentation here: http://api.highcharts.com/highcharts#xAxis.plotLines.

    The basic format is:

    xAxis: {
        plotLines: [{
            color: '#FF0000', // Red
            width: 2,
            value: 5.5 // Position, you'll have to translate this to the values on your x axis
        }]
    },
    
    0 讨论(0)
提交回复
热议问题