Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Separation of percentage values on the pie chart and rollover text


I am using pie graph. I want text to be displayed in rollover as part 1, part 2 and part 3 etc.
Implementing hoverinfo:“text” I am able to see desired text in rollover but same text is coming on the pie chart with percentage values.

Is it possible to display only percentage number on the pie chart and keep text in rollover?

var txt = [‘part 1’,‘part 2’,‘part 3’];
var data = [{
values: [19, 26, 55],
text: txt,
labels: [‘Residential’, ‘Non-Residential’, ‘Utility’],
type: ‘pie’

Plotly.newPlot(‘myDiv’, data, {}, {showSendToCloud:true});


Sounds like you’re looking for

That’s correct!
I want to display percentage (e.g. 55%) on pie chart and text in hoverInfo tooltip (i.e. part 3)
Is it possible?

Thanks a lot etienne!
I can set percent as a textinfo as mentioned on page