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 to remove labels from a bar graph in Dash?

I have a bar graph with 3 bars and I would like to remove the 3 labels on the top. How to do that ?
Thank you.

Check out the examples on bars here:
and in customizing the labels and axes here:

Thanks, I’ve already checked them actually., but still can’t remove the labels. Spent almost 2 hours on it :sleepy:

‘type’ : ‘bar’,
‘y’ : data,
‘x’ : [LEGEND[feature]],
‘text’: data,
‘hoverinfo’ : ‘text’,
‘marker’ : {
‘color’ : color,
‘line’ : {‘width’ : 0,
‘color’ : ‘#444
‘name’ : cityName # disabling this.

For instance, here if I remove the ‘name’ attribute, I got trace1 or trace2 as a label.

Hm, I’m not sure which labels you’re referencing. If you want to remove the legend, see here:, if you want to remove the hover labels, see here: You can also play around with this in the interactive chart maker: and then see the values in the JSON panel on the left.

The ‘showlegend’ attribute had to be set to False in the layout section.
How did I miss that ? :blush:

1 Like