Add_vrect doest work properly with dash

Hi All,
I am not sure if I am posting in the right section since my problem is related to plotly, but only when used with Dash !
I use add_vrect to highlight a part of a bar chart in plotly and it works very well.
I recently started using Dash and It worked until I updated conda.

Now by default add_vrect do not seem to work. Well, after checking on different example, it actually does but the โ€œheighโ€ (it should not have one, right?) of the rectangle is set to 1 in the y axis, instead of the height of the graph. Therefore, on most chart where the y scales is a couple of hundreds and above, the retangle is not visible at all anymore.

The same example within a jupyter notebook works as expected,


am I missing something or is this just a bug ? I guess I could find a workaround with a rectangle shape and set the hight myself, but Iโ€™d rather stick to V_rect if possible

print(plotly.__version__)
4.14.1
1 Like

Am I the only one having the issue ?

Iโ€™m having this issue as well. I noticed the same behaviour you reported: the vrect is correctly shown on Jupyter, whether it stops to 1 into Dash app. Have you found a workaround for this problem?
Thank you! :slight_smile:

Lorenzo

Usually this kind of problem happens when youโ€™re not running the latest version of Dash, which today is 1.19.0.

Same problem persists with Dash 1.10.0

Indeed using the latest versions of plotly & dash fixed the issue for me.
Thanks :slight_smile:

This problem persists after updating to Dash 1.19.0. Any dependencies that might require updating? Iโ€™m running Plotly version 4.14.3, python 3.7.10