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

How to make the options of one drop down menu be dependent on the selection of another drop down menu?

I have two filters ‘Country’ and ‘City’, each is a drop down menu. I would like the ‘City’ list to be updated with cities based on the selection in ‘Country’. Is it possible to do that in plotly.js?

It’s possible, but that would be pretty hard. You’ll need to listen to plotly_afterplot and then call Plotly.relayout to change the updatemenu buttons accordingly.