Highstocks - Place a line between columns when usi

2019-05-23 03:47发布

Is it possible to place a line between columns when using a datetime axis?

http://jsfiddle.net/ozke/30go12jy/4/

Relevant code:

    chart: {
        type: 'column'
    },

    xAxis: {
        type: 'datetime',
        gridLineWidth: 1, gridLineColor:'#FF0000', gridZIndex: 4 /* grid line styles */
    },

    plotOptions: {
        column: {
            grouping: false,
            borderWidth: 0,
            groupPadding: 0,
            pointPadding: 0
        }
    }  
  • I was originally trying to do something similar here but the question evolved a bit to much to a different place. Hence me asking again.

1条回答
淡お忘
2楼-- · 2019-05-23 04:47

You can use plotLines like this:

plotLines: [{
            value: Date.UTC(2014,  1, 15),
            width: 1,
            color: 'red',
            dashStyle: 'dash',
            label: {
                text: 'value',
                align: 'right',
                y: 20,
                x: 0
            }
        },
        {
            value: Date.UTC(2014,  2, 17),
            width: 1,
            color: 'red',
            dashStyle: 'dash',
            label: {
                text: 'value',
                align: 'right',
                y: 20,
                x: 0
            }
        },
        ...
     ]

Here's the DEMO

查看更多
登录 后发表回答