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!

Bar Chart: Individual bar toggle

Hello,

I was wondering if it is possible in Plotly to toggle a single bar in a vertical/horizontal bar chart? We have a couple of charts where there are several bars representing data. The client would like to have control to turn off/on one “bar” at a time.

Thank you.

Here’s how: https://codepen.io/etpinard/pen/XaVbOP

Thanks @etienne , this is most of what I needed. I noticed that if I switch to removing the largest bar on the chart, the y axis rescales. If i then show the bar again, the y axis doesn’t scale back. Is it possible to refresh the y axis correctly in this type of scenario?

Thanks again for all your help!