简体   繁体   中英

How to hide labels in the highcharts in the pie

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.

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

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

FIDDLE

A simple way i found to remove tooltips labels that works. in the file that is usually inside the JS folder called (chart.min.js) after editing it and, click at the beginning of the file so that the cursor is at the beginning, and the search is actually started from the beginning. After searching for the word "customTooltips" without quotes, the first record found will be like this "customTooltips:,1": after changing the value to 0 it will look like this "customTooltips,.0". save the file, ready the tooltips will no longer be displayed. remember, take the first record found from left to right from the beginning to the end of the file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM