Me Sa
Me Sa

Reputation: 1094

stacked column points connected with a dashed line highcharts

I tried many way and didnt get the result may please help how can i generate this kind of chart in highchart.

enter image description here

Upvotes: 0

Views: 49

Answers (1)

ppotaczek
ppotaczek

Reputation: 39099

That series will be available since Highcharts v8.0.0: https://github.com/highcharts/highcharts/issues/11311. For now you can use a combination of scatter and line series:

var scatterData = [2, 3, 7, 8, 9],
    series = [{
        type: 'scatter',
        data: scatterData
    }];

scatterData.forEach(function(el, i) {
    series.push({
        dashStyle: 'ShortDash',
        data: [
            [i, 5],
            [i, el]
        ]
    });
});

Highcharts.chart('container', {
    series: series
});

Live demo: http://jsfiddle.net/BlackLabel/uwcL0h8b/

API Reference: https://api.highcharts.com/highcharts/series.line.dashStyle

Upvotes: 1

Related Questions