How to hide labels in the highcharts in the pie

2019-06-15 01:14发布

问题:

Can't figure out how to hide the pie labels.

I've already tried these settings:

                xAxis: {
                    labels:
                    {
                        enabled: false
                    }
                },
                yAxis: {
                    min: 0,
                    gridLineWidth: 0,
                    title: {
                        text: ''
                    },
                    labels:
                    {
                        enabled: false
                    }
                },

but looks like it doesn't work.

回答1:

You set that in the plotoptions for the pie chart, not the axis :

plotOptions: {
    pie: {
        allowPointSelect: true,
        cursor: 'pointer',
            dataLabels: {
                enabled: false,
            }
        }
    }

FIDDLE