highstock - Impossible to have plotband through current date in Highcharts -
i'm using highstock/highcharts, , plotting stacked (and grouped) column, based on last 5 minutes.
i want highlight last minute (and have been using plotband that).
my problem plotband not cover whole time range, can see in http://jsfiddle.net/duuue/1/
what want plotband cover last minute (up until current timestamp), using stacked/grouped columns makes weird, because columns not drawn @ corresponding x-axis tick corresponds timestamp.
code this:
$(function () { highcharts.setoptions({ global: { useutc: false } }); var = new date().gettime(); var last10min = - (10 * 60 * 1000); var lastmin = - (60 * 1000); $('#container').highcharts({ chart: { type: 'column' }, xaxis: { type: 'datetime', mintickinterval: 60 * 1000, tickmarkplacement: 'on', plotbands: [{ // highlight last minute color: '#fcffc5', from: lastmin, to: }], }, plotoptions: { series: { pointstart: last10min, pointinterval: 60 * 1000 // 1 minute }, column: { stacking: 'normal', pointplacement: 'between' } }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1] }, { data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5] }] }); });
i think need remove pointplacement
options, see: http://jsfiddle.net/fusher/duuue/2/
reported issue bug tracker.
possible workaround: http://jsfiddle.net/duuue/7/
Comments
Post a Comment