javascript - Highcharts - line between two categories -
i have chart of type column range , requirement have line connecting 2 categories.
$(function() { $('#container').highcharts({ chart: { type: 'columnrange', inverted: true }, title: { text: 'test' }, subtitle: { text: 'sample' }, xaxis: { categories: ['jan', 'feb', 'mar'], visible: false }, yaxis: { visible: false }, legend: { enabled: false }, series: [{ name: 'series1', data: [ [0, 3], [0, 3], [0, 3] ], pointplacement: -0.20, pointwidth: 50 }, { name: 'series2', data: [ [3, 6], [3, 6], [3, 6] ], pointplacement: 0, pointwidth: 1 }, { name: 'series3', data: [ [6, 9], [6, 9], [6, 9] ], pointplacement: 0.20, pointwidth: 50 }] });});
how draw line 1 category another? there property available?
you should able achieve similar chart adding new line series chart:
{ name: 'series4', type: 'line', marker: { enabled: false }, index: 1, data: [ [0, 1.5], [1, 1.5], [2, 1.5] ], },
here can see example how chart may work: http://jsfiddle.net/ebtygovh/6/
you can use renderer.path adding lines chart: http://api.highcharts.com/highcharts/renderer.path
Comments
Post a Comment