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!