Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

How do you format hoverinfo for Pie chart?


I would like to be able to format the values that are displayed in hoverinfo for pie chart. Here is a codepen for context:

How can I go about formatting each of the value in allValues so it can show up as 1.8k, 600, 3.6k if they are integers or show up as 00:30:00, 00:10:00, 01:00:00 if they are seconds?


Unfortunately, there’s no way to specify a custom format for pie hover labels at the moment.

You’ll have to build a text array from scratch: