Use Record count as Donut label

@shaun, Can you please suggest me how to add “Record Count” as label for Donut Chart ?

@Chaish Right now the out of the box setting only allows putting percentages as pie label.

We have some examples of adding record count to the pie chart legend, as an alternative solution. You can take a look at this example custom style:

1 Like

@shaun Thanks a lot for the update. Is it not possible to have the record count as the label for the Donut chart using custom JS ? Please see the below requirement, where 3,1 and 13 are the number of records.
Donut_label

@Chaish unfortunately not easy to do because the pie slices are rendered using canvas which prevents accessing elements using Javascript.

The legend does not use canvas, so you are able to iterate through those elements and modify/append to them the record count as the example post shows.

Adding a total in the center of the donut might be easier to achieve since it’s a static location. Refer to this post:

@shaun Thanks a lot for your efforts :slight_smile: