'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.
Solution 1:[1]
You set that in the plotoptions for the pie chart, not the axis :
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: false,
}
}
}
Solution 2:[2]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Hyder B. |
Solution 2 | Eric Aya |