Chart.js: Segment Labels in Doughnut/Pie Charts

Created on 26 May 2016  路  7Comments  路  Source: chartjs/Chart.js

I would like to display a percentage label for each segment in a Pie/Doughnut chart like this:

http://jsfiddle.net/g6fajwg8/
screen shot 2016-05-26 at 2 30 46 pm

implement externally

Most helpful comment

I could kiss you, @simonbrunel. I won't. But I could.

All 7 comments

All of the other doughnut / pie labelling issues are wrapped up in #78

In the comments, there is a good solution for making this work in v2

how about something like
labels(true)
I mean it really seems like the library should support labels out of the box

want to concate label value with percentage.
Ex :- Red : 38%
How can i do this ???

The "solutions" in https://github.com/chartjs/Chart.js/issues/78 are a confused jumble of competing ideas. A simple boolean for enabling the display of labels inside pie/doughnut charts is what is needed, not complex hacks/workarounds.

@justincone you should have a look to the chartjs-plugin-datalabels plugin

I could kiss you, @simonbrunel. I won't. But I could.

Thank you so much for this demo very helpful demo.

Was this page helpful?
0 / 5 - 0 ratings