score:2
Accepted answer
there is no direct possibility to create multiple datalabels. as you can see on this post, a solution would be to create two overlaying charts. see jsfiddle here :
$(function () {
// create the chart
$('#container').highcharts({
chart: {
type: 'pie',
backgroundcolor: 'rgba(0,0,0,0)',
y:100
},
title: {
text: 'sfs '
},
yaxis: {
title: {
text: ' '
}
},
plotoptions: {
pie: {
// y:1,
shadow: false,
// center: ['50%', '50%'],
borderwidth: 0,
showinlegend: false,
size: '80%',
innersize: '60%'
,
data: [
['allo', 18],
['asdad', 14],
['asdad', 11],
['asdasd', 10],
['adad', 8],
['asdada', 7],
['adada ada', 7],
['adad', 5],
['asdas',7],
['ada', 3]
]
}
},
tooltip: {
valuesuffix: '%'
},
series: [
{
type: 'pie',
name: 'browser share',
datalabels: {
color:'white',
distance: -20,
formatter: function () {
if(this.percentage!=0) return math.round(this.percentage) + '%';
}
}
},
{
type: 'pie',
name: 'browser share',
datalabels: {
connectorcolor: 'grey',
color:'black',
// y:-10,
softconnector: false,
connectorwidth:1,
verticalalign:'top',
distance: 20,
formatter: function () {
if(this.percentage!=0) return this.point.name;
}
}
}
]
});
});
Source: stackoverflow.com
Related Query
- Multiple labels in Highcharts Pie Graph
- Highcharts - Multiple Axis Graph not displaying labels
- How to hide labels in the highcharts in the pie
- Highcharts Pie Chart.How to set labels in two lines
- Highcharts - labels inside and outside a pie chart
- Highcharts not displaying data labels for Pie chart in arabic
- highcharts - chart names for multiple pie chart series in one chart
- Enable or disable data labels shown in pie charts in Highcharts on click of a button
- How do I style the series labels on a Highcharts pie chart?
- Highcharts - Hide child labels in a multiple levels and multiple layouts treemap
- highcharts pie chart multiple sections selection
- Highcharts not displaying series data for graph with multiple Y-axes
- Highcharts pie graph with two rings filtering
- Show all labels in highcharts horizontal bar graph
- Hide Data Labels in Pie Chart below 400px width - Highcharts
- set Pie chart labels exact in center of Slices of PIE highcharts
- How to show multiple pie charts using highcharts
- Highcharts Pie doesn't display the labels (for some data series)
- Multiple images for Highcharts X Axis Labels
- Highcharts - how to do a responsive pie chart when the texts of the labels are long
- Highcharts Pie chart multi line labels overlapping
- Highcharts - how to show/hide multiple data labels on mouseOver and mouseOut
- Image on pie graph with highcharts
- Show data labels on top in stacked column graph in highcharts
- How to show multiple Highcharts graph on one page
- Stack labels not rendered correctly when exporting Highcharts graph
- Highcharts display label for pie chart using html table as data source
- Can't see the labels on Pie HighCharts
- highcharts multiple line live graph
- Adding Date Labels to a HighCharts line graph
More Query from same tag
- ReactErrorUtils.invokeGuardedCallback in React fires event repeatedly in IE browser
- How can I extend the lines of this Highchart series to the edges of my chart area?
- Highchart not printing json when I add extra line to redirect
- Drag Sensitivity in ParallelCoordinates with Drag and Drop
- How to set tooltip background as point color for split chart in Highcharts?
- Proper way to remove all series data from a highcharts chart?
- Using Bootstrap Datepicker with Highcharts
- Is angular2-highcharts supported in Angular 11?
- Adding regression to multiple series imported from CSV
- Legend in network graph ( Highchart Js)
- highcharts 7 issue with negative ticks
- HighStock HighCharts Setting Flag on Click Event
- how to place same highcharts series beside each other
- How to make color bar above navigator in Highstock?
- How can I change highcharts events after the chart has been initialized
- How to display fixed tooltip position in a multiple series highchart?
- IE 6 Script error when Highstock & Highcharts are loaded
- Create Highchart from the Following Data
- Highcharts: structure legend by subtitles
- Like to show all the labels of x axis in highchart
- how to add an color picker control to highchart for changing the color of series by user
- How to load a Highcharts options object, including a callback property, with getJSON
- How to fire a jquery function onchange from an html element in highchart event on click?
- How can I wrap long text labels in highchart nested groups
- Highchart Barchart xAxis
- Highcharts JSON formatting - splitting up and preprocessing data for charts?
- Stacked column highcharts change x and y
- I want to make the spline chart from highcharts.com smaller in size
- Show only discontinuous points in Highcharts line graph
- Highcharts add line-through to legend text when hidden (itemHiddenStyle)