Using Plotly in streamlit seems to only work when clicking and dragging, or leaving the mouse on the plotly graph after clicking and dragging. Otherwise the graph disappears.
I’m unable to reproduce the issue with your provided code snippet. Could you provide some more information? When does the graph disappear? Does it appear for a few seconds after the page loads then disappears? Do you have to take some action for it to disappear?
Perhaps if you could create an exact snippet where the graph is disappearing for you and then share exact reproduction instructions. For ex the code you shared above does not have any imports and does not run as given. Please include a full snippet with instructions to repro.
Also what streamlit version are you on? OS? Browser?
Hi,
I just tried your code on my machine, win10 on python 3.7.5, streamlit 0.51 and plotly 4.4.1, chrome 78
It seems to all be working well, no issue with display even when browsing away from the page and coming back
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.