ChrisDelClea / streamlit-agraph

A Streamlit Graph Vis
MIT License
387 stars 52 forks source link

Pass Click Values to Python #20

Closed conradbez closed 2 years ago

conradbez commented 2 years ago

12

Passes dictionary back to streamlit in the form

{"action" : "ACTION_COMPLETED_BY_USER" , "node" : NodeID }

or

{"action" : "ACTION_COMPLETED_BY_USER" , "sourceNode" : NodeID , "targetNode" : NodeID }

Todo - might want to consider a better interface to record actions etc.

ChrisDelClea commented 2 years ago

Hey @conradbez ,

nicely implemented and thanks for your contribution. Could you provide an example of how to use it in the example folder?

Best regards Chris

JuanFMontesinos commented 2 years ago

Hey How to make use of this feature? Where does streamlit save the info.

ChrisDelClea commented 2 years ago

Good Question, that's why i was asking for an example :)

ChrisDelClea commented 2 years ago

I guy you can basically get it from agraph. But have to test it too.

clicked_node = agraph()

EDIT: Seems not to work with latest updates anymore. @conradbez , can you explain how to use it and may fix it?

brandaobrandisborges commented 2 years ago

Hello everyone. Anyone got it working on streamlit?