marimo
marimo copied to clipboard
Improve Altair interactive charts: pan/zoom vs selection
Description
Using marimo.ui.altair_chart produces an interactive Altair chart. Clicking and dragging selects a portion of the data and the returns the corresponding subset of the plotted dataframe (see the docs here). This is different from Altair's native .interactive() method, which instead lets you pan the view (dragging) and zoom (scrolling).
I'm more often interested in seeing the data (pan/zoom) than selecting some subset, I would prefer that to be the default controls attached to mouse interaction.
Suggested solution
- Make the default behavior configurable via code
- Add a set of controls to a
marimo.ui.altair_chartsimilar to what plotly does
Alternative
No response
Additional context
No response