-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add event back to python #19
Comments
Hey @nathalieguillemain !
You explained the problem perfectly :( what I could eventually try is a Could you maybe describe your use case for this so I have a basic idea of what you're trying to accomplish? Have a nice day? |
Hello Fanilo,
In this example, when I click on a bar in the graph the params contains So I can now update another graph selecting Microsoft (dataIndex is more usefull) in a dataset giving a hability to drilling into the data. Such as I can do in Tableau Software If "something = st_pyecharts(b, events=events)" would give the param object as a Dict it would be very userfull Thank you very much |
Hi, @nathalieguillemain looks like we have the same problem.
Hope this helps. |
That's a nice workaround @flunardelli :) feel free to post it back to the Forum post, will definitely help other users! Still need to push a fix as this solution I suppose will not work on Streamlit Sharing 🤔 PS: Thiago's Streamlit hidden hacks, it's like manipulating Streamlit internals 😆 |
thx @andfanilo
and probably it will work on Streamlit cloud/share... best. |
Starting 0.4.0, any value returned inside the event method is sent back to Streamlit. If no return values nor events are provided, all works the same. events = {"click": "function(params) {console.log(params);return params.name}"}
something = st_pyecharts(b, events=events)
st.text(something) Thanks @brightxml for the contribution 😄 |
It would be great if events could be sent back to python to add some interactions on graphs
I understand that Streamlit object is no longer available after component has been rendered.
May be the onclick could be defined as the default behavior of the component ?
Thanks
The text was updated successfully, but these errors were encountered: