Tapas Mahato
Tapas Mahato

Reputation: 23

Highchart connector custom style

I want to create doughnut chart using highcharts like below: enter image description here

Please help me to create. Thanks in advance.

Upvotes: 0

Views: 586

Answers (1)

ppotaczek
ppotaczek

Reputation: 39099

By using attr method you can set stroke-dasharray property for connectors:

chart: {
    ...,
    events: {
        load: function() {
            var points = this.series[0].points;

            points.forEach(function(p) {
                p.connector.attr({
                    'stroke-dasharray': "4, 4"
                });
            });
        }
    }
}

Live demo: https://jsfiddle.net/BlackLabel/boxhv0yt/

API Reference: https://api.highcharts.com/class-reference/Highcharts.SeriesPieDataLabelsOptionsObject#connectorShape

Docs: https://www.highcharts.com/docs/advanced-chart-features/pie-datalabels-alignment

Upvotes: 2

Related Questions