I am using streamlit library for simple dashboard. Is it possible to use plotly click events in streamlit. Is there any other way to get click events on bar chart, scatter plots, etc, in streamlit?
The code that i tried :
import plotly.graph_objects as go
import streamlit as st
import numpy as np
Hi, I see this thread was created in 2019, I just wanted to know if there have been updates on this matter? i.e. using go.FigureWidget and get outputs from graph selection?
Hi, I have added this event somewhere in between my Streamlit dashboard for a specific visual. The code would not run beyond that specific visual in the first go until I click on it and create a streamlit event, only then the rest of the visuals would get displayed. Can anyone help with it?
Hey, ran into the same issue and figured out whatâs wrong. Looks like the recent streamlit update is trying to managing plotlyâs color. As a result all the color will show up as black unless you use streamlitâs plotly_chart method.
Here is the thread talking about the exact same issue.
Hopefully streamlit will fix this. In the mean time if you explicit set plotly line color (might have to use plotlyâs graph_object interface) the color will appear correctly.
Hi, This discussion was very helpful! Thanks all!
I have a quick question, I am using Plotly-events for capturing user selection from a bar chart but I want to reset this selection to null when my streamlit dashboard reloads. How can I make this happen? Thanks.
Hi, any update regarding getting the clicked point from a plotly chart?
The work around of using plotly-events doesnât work well after streamlit 1.12.0.
Thanks!
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.