Chart.js: Show label on the piechart not working, how to?

Created on 31 Oct 2014  ·  8Comments  ·  Source: chartjs/Chart.js

With the older version you could use

            color : "#F34353",
            label : 'This is my label',
            labelColor : 'white',
            labelFontSize : '16'

and it would show on the chart, current version does not seem to have this option and i found nothing under the docs, am i missing something? thanks for any help.

See here for older version labeling:
http://jsfiddle.net/nCFGL/223/

enhancement

Most helpful comment

Having an option for the labels to display the percentage of teh slice would be of great advantage and informative

All 8 comments

Looks like they've made the labels only visible when you hover over them in the new version.
Example: http://jsbin.com/cayetu/1/edit?html,js,output

What you can also do is add a legend and then all the different parts of the pie chart will work just like the doughnut chart on the main chartJs page. I think that would look better than having the labels always on in the pie chart. It also is better for pie charts where one slice of the pie is too small for the label to be displayed. That's my guess as to why they changed it.

Is there a specific reason why you wanted it the old way? You/We/I could create an option to always have the labels visible in the chart.

To save on space, instead of having yet another div with the labels why not have them within the chart if its a big one?

I would be interested on doing this, at least having the option to activate the feature.

I am personally interested in this as well. Yet I would love to have the option to additionally "permanently" display custom labels within the segments of a piechart while still having tooltips and legends... If possible that is ;)

Is there a way to arrange the spans from the legend div distributed around the piechart? How would one get the coordinates of the slices?

Options for permanent labels are still under works right?

Consolidating all doughnut labelling issues in #78

Having an option for the labels to display the percentage of teh slice would be of great advantage and informative

I would like to have an opition to put the value and the name of the label

Was this page helpful?
0 / 5 - 0 ratings