Black Lives Matter. Please consider donating to Black Girls Code today.

Show Selected Bars in Horizontal Bar Chart (gray out those not selected)

Is there a way to gray out bars that weren’t selected in a horizontal bar chart?

There is a way to do this with a vertical bar chart and scatterplots… via update_traces(selectedpoints = list_of_point_indexes_that_are_selected)
This is illustrated in this example .

But when I turn a bar chart horizontal, all the pointindexes in the selectedData are same between the different bars. The only thing that is different between them (other than x and y values) is “curveNumber” … However there is no update_traces(selectedcurves = ) method or anything of that illk.

How would I go about doing this Is this possible?