score:43
Accepted answer
you may want to look @ datalabels.formatter
. this.percentage
option is available for pie
also datalabels.distance
can be set to a negative value for datalabels inside the pie.
score:1
try this code. it works for me:
'labelformatter':function () {
var total = 0, percentage;
$.each(this.series.data, function() {
total+=this.y;
});
percentage=((this.y/total)*100).tofixed(1);
return this.name+' '+percentage+'%';
}
score:8
its suprisingly easy. in your tooltip or datalabels section change your format.
from:
format: '<b>{point.name}</b>: {point.y:.1f} rs.',
to:
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
Source: stackoverflow.com
Related Query
- Displaying percentage inside pie item for highcharts
- Highcharts not displaying data labels for Pie chart in arabic
- highcharts pie dynamic label inside and outside for each slice
- Highcharts display label for pie chart using html table as data source
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- Displaying percentage in Y-axis of Highcharts column chart
- Highcharts percentage of total for simple bar chart
- Highcharts - labels inside and outside a pie chart
- HighCharts Pie Chart - Add text inside each slice
- highcharts - chart names for multiple pie chart series in one chart
- Highcharts pie dataLabels inside and outside
- HighCharts - Pie chart drilldown for multilevel (3 to 4 level)
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- How to center chart title position dynamically inside pie chart in highcharts
- Highcharts not displaying series data for graph with multiple Y-axes
- Displaying additional text for Highcharts Bubble chart
- Highcharts - Display legend for Pie chart in two columns
- highcharts donut pie - different color for the data than its drilldown
- Passing in Id for each data item in bar chart using highcharts
- Using connecting legends for two Highcharts pie charts
- Highcharts - where to place style and changing style for one wedge in a pie chart
- highcharts pie chart color for dynamic data
- Simple, Open source PHP wrapper for Highcharts library
- Displaying MoM in highcharts for uneven months
- Highcharts Semi Donut Pie with Negative Percentage
- Gson to get Json value for a pie chart using Highcharts
- Displaying count on bar and percentage on Y-axis of cloumn chart using Highcharts
- Highcharts how to make a set number of colors for pie chart data and drilldown data
- jquery show() not displaying properly for highcharts graph
- HTML table as data source for highstock charts using highcharts
More Query from same tag
- Converting a complex json format to C# class for Highchart Organization Chart
- Displaying MoM in highcharts for uneven months
- How to dynamically update highcharts using jQuery UI sliders
- How to add a line at the bottom of a column chart in highcharts
- applying stock chart style in highchart
- Highcharts Default Colors Are Not Same at Pie and Column?
- How to setting to draw a line connect the stack bar
- Align labels of axis with type category under ticks
- How to add another series into my highchart
- Highcharts JS- add third variable to tooltip for two series
- How to extract data fron json to javascript highchart?
- How to fade other yAxises in highchart when hover on marker?
- Pass JSON-encoded PHP Variable to HighCharts
- Highcharts Pie Donut Customize shape
- from Google Visualization Datatable to Highcharts data format
- Synchronise 3 Highcharts Trend Views
- Plot Highchart Gauge with JSON Data
- Highcharts, how to use gradient without setting a color?
- Calling Typescript function from Highcharts load event
- Highcharts - Change opacity of chart when tooltip is shown
- Draw vertical lines and horizontal bands
- How to make Highstock work with two xAxis?
- Highcharts Legend Custom HTML
- Highcharts with datetime and also additional data (tooltip text)
- Set Opacity Pie Chart Highcharts
- Adding highcharts to mapbox popup from CSV?
- how to display hctreemap2 unique levels?
- Dynamically graph points with Highcharts
- highcharter - categories on the y axis
- Plot band not limited to xAxis, draws for the whole graph