Hello.
Iâd like to find some examples for âon_changeâ function for âScatterâ plot. Just need to send some event when plot is changed (eg. series are hide) to trigger some function which will update another plot (eg. resolve average).
I tried to use it similarly to what Iâve found for âscatter.on_clickâ but dunno how to get it work. However, this example https://plot.ly/python/click-events/
as well doesnât work for my case, because I use âiplotâ. I hope âon_changeâ donât worry about âiplotâ.
Any suggestgions?
Later on, Iâve found I could use @callbacks with relayoutData
property.
@app.callback(Output('data-bars', 'figure'), [Input('data-lines', 'relayoutData')])
def upd_graph(reldata):
...
title = str(np.random.randn(1))
print(reldata)
return { 'data': data, 'layout': layout.update({'title': title}) }
Yes, it triggers events but doesnât interact with legend. I get print
messages about tools activity but not while hiding series in my legend. Which property should I try?