Is it possible to assign a dynamic number of multiple y-Axes?

In Dash, I have a dcc.Dropdown() input with multi=True. That is, I do not know a priori how many input items the user will select. But I will need to assign a unique y-axis to each item in the input selection.

Setting multiple y-axes in Plotly is straightforward (Multiple axes in Python), and works well when I hard code the y-axes. Is there a way to achieve this dynamically, when the number of y-axes is unknown?

I have seen this asked before in the archives, but I haven’t seen an answer, so I’m wondering if it’s possible at this time?

Hi @shwiftyRick ,

in the case of multi=True , the return of the property “value” is an array/list. So you could check for the length of this list and create your y-axes accordingly.