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.
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
来源:https://stackoverflow.com/questions/28066053/highstocks-place-a-line-between-columns-when-using-datetime-axis