Proposal
Today the only way to add a series, drop a pane, or add an overlay to a pane is to call plot_xy() again with a new array. That call rebuilds the plot completely: renderers are freed, the dataset is disconnected and reconnected, hover state is lost, any pinned tooltip disappears, and the legend is rebuilt from scratch. Domain overrides go with it.
What would help: incremental operations on the plot, something like adding, removing and rebinding a single series, and adding or removing a pane or an overlay, keeping the rest of the plot alive.
Proposed solution
Introduce a ResolvedBindings object built from from the dataset, the config and the bindings. This build is cheap. The plot keeps the ResolvedBindings it is currently drawing. On refresh (automatic or manual) it builds a fresh instance and compares it with the current one (like styles are). If they match, nothing to do. If they differ, create/update only what differs.
Proposal
Today the only way to add a series, drop a pane, or add an overlay to a pane is to call plot_xy() again with a new array. That call rebuilds the plot completely: renderers are freed, the dataset is disconnected and reconnected, hover state is lost, any pinned tooltip disappears, and the legend is rebuilt from scratch. Domain overrides go with it.
What would help: incremental operations on the plot, something like adding, removing and rebinding a single series, and adding or removing a pane or an overlay, keeping the rest of the plot alive.
Proposed solution
Introduce a
ResolvedBindingsobject built from from the dataset, the config and the bindings. This build is cheap. The plot keeps theResolvedBindingsit is currently drawing. On refresh (automatic or manual) it builds a fresh instance and compares it with the current one (like styles are). If they match, nothing to do. If they differ, create/update only what differs.