plot
plot copied to clipboard
Incremental rendering for performance?
Can Plot expose some kind of update() function so we could somehow either reuse elements or only re-render certain marks (like a rule + text that gets moved around based on input)
I feel there are two very different ways to update a mark:
- one is to just update the relevant mark with a data join + transitions, keeping the scales fixed to whatever setting they had from the initial data. This can be done in a plugin: https://observablehq.com/d/dd83bd6ccd0dec4f (contrived example)
- the other is to "redo" everything that needs to be changed (including scales and their potential impact on other marks), optimizing for transitions.
Another example here https://talk.observablehq.com/t/plot-update-pattern/5169
Recent exploration by @Fil of animation in Plot https://observablehq.com/@fil/plot-animate-a-bar-chart
Thanks to the new render transform, "animate a bar chart v2" is much leaner than v1.