0

I am new to High charts. Wanna know how can I have different legend symbols for different pieces of pie chart in High charts.

Expected behaviour:

enter image description here

my chart options are:

// Create the chart
Highcharts.chart('container', {
    chart: {
        type: 'pie'
    },
    title: {
        text: 'Browser market shares. January, 2018'
    },
    subtitle: {
        text: ''
    },
    accessibility: {
        announceNewData: {
            enabled: true
        },
        point: {
            valueSuffix: '%'
        }
    },

    plotOptions: {
        series: {
            dataLabels: {
            connectorWidth:0,
            distance:'1%',
                enabled: true,
            }
        },
        pie: {
         showInLegend:true
        }
    },
    tooltip: {
        headerFormat: '<span style="font-size:11px">{series.name}</span><br>',
        pointFormat: '<span style="color:{point.color}">{point.name}</span>: <b>{point.y:.2f}%</b> of total<br/>'
    },
    series: [
        {
            name: "Browsers",
            colorByPoint: true,
            data: [
                {
                    name: "Chrome",
                    y: 461,
                },
                {
                    name: "Opera",
                    y: 4621,
                },
                {
                    name: "Other",
                    y: 197,
                }
            ],
            marker: {
                    symbol:'triangle'
            }
        }
    ]
});

Fiddle link

From the fiddle link you can see that I am getting circular legends for all three slices however I wanted to have different symbols for that. So please help me in this regard.

0 Answers0