Open dmarx opened 7 years ago
This looks like a way more versatile and customizable solution:
Related resources;
GraphWidget is designed for hosted plotly graphs, not offline mode. Here's a demo of a possible solution for offline mode:
NB: This solution completely redraws the chart rather than updating it. There's probably a better way.
This will work locally but according to this, widgets won't display in nbviewer, which makes sense: rebuilding the chart each time this way requires running a bespoke python function. Obviously I need a running kernel for this to work. Might still be fun to play with and worth implementing as an experiment and learning experience, but not the way to go if my goal is build something random people online can use simply.
This hasn't been updated in two years, but might be worth checking out: https://github.com/plotly/postMessage-API
I thought the control elements I had been playing with were the newly deployed features I had read about, but it looks like that's a new dashboarding package called "dash", which I may need to install separately:
I have a feeling if widgets won't work on nbviewer, neither will Dash. Uses Flask and socketio in the backend... not super optimistic. I need the ability to embed JSON and/or manipulate the d3 directly.
Filters:
Complexities:
This is uglay, but from plotly's "custom button" docs, it appears to be their recommended practice. Reference the "all" and "both" options in the "relayout" and "update" button demos.