marimo icon indicating copy to clipboard operation
marimo copied to clipboard

Improve Altair interactive charts: pan/zoom vs selection

Open mbellitti opened this issue 1 year ago • 0 comments

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

  1. Make the default behavior configurable via code
  2. Add a set of controls to a marimo.ui.altair_chart similar to what plotly does image

Alternative

No response

Additional context

No response

mbellitti avatar Feb 29 '24 15:02 mbellitti