Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

docs: add treemaps charts and sunbursts to plotly

Myles Scolnick6a9fe12801d8
diff --git a/docs/api/plotting.md b/docs/api/plotting.md
index 43e3a227c1..699ffeba1b 100644
--- a/docs/api/plotting.md
+++ b/docs/api/plotting.md
@@ -92,11 +92,11 @@ alt.data_transformers.enable('marimo_csv')
## Reactive plots with Plotly
-```{admonition} mo.ui.plotly only supports scatter plots
+```{admonition} mo.ui.plotly only supports scatter plots, treemaps charts, and sunbursts charts.
:class: warning
marimo can render any Plotly plot, but [`mo.ui.plotly`](#marimo.ui.plotly) only
-supports reactive selections for scatter plots. If you require other kinds of
+supports reactive selections for scatter plots, treemaps charts, and sunbursts charts. If you require other kinds of
selection, consider using [`mo.ui.altair_chart`](#marimo.ui.altair_chart).
```
diff --git a/docs/guides/plotting.md b/docs/guides/plotting.md
index c4c2fce645..345f30a305 100644
--- a/docs/guides/plotting.md
+++ b/docs/guides/plotting.md
@@ -25,7 +25,7 @@ available in Python as a Pandas dataframe_!
:class: warning
Reactive plots currently require Altair or Plotly. Install with `pip install
altair` or `pip install plotly`, depending on which library you are using.
-Selections in plotly are limited to scatter plots, while Altair supports
+Selections in plotly are limited to scatter plots, treemaps charts, and sunbursts charts, while Altair supports
a larger class of plots for selections.
```
@@ -214,15 +214,14 @@ conda install -c conda-forge "vegafusion-python-embed>=1.4.0" "vegafusion>=1.4.0
### Plotly
-```{admonition} mo.ui.plotly only supports scatter plots
+```{admonition} mo.ui.plotly only supports scatter plots, treemaps charts, and sunbursts charts
:class: warning
marimo can render any Plotly plot, but [`mo.ui.plotly`](#marimo.ui.plotly) only
-supports reactive selections for scatter plots. If you require other kinds of
+supports reactive selections for scatter plots, treemaps charts, and sunbursts charts. If you require other kinds of
selection, consider using [`mo.ui.altair_chart`](#marimo.ui.altair_chart).
```
-
```{eval-rst}
.. marimo-embed::
:size: large
diff --git a/marimo/_plugins/ui/_impl/plotly.py b/marimo/_plugins/ui/_impl/plotly.py
index bfeb8edfd5..cffc5ada7a 100644
--- a/marimo/_plugins/ui/_impl/plotly.py
+++ b/marimo/_plugins/ui/_impl/plotly.py
@@ -46,7 +46,8 @@ class plotly(UIElement[PlotlySelection, List[Dict[str, Any]]]):
Use `mo.ui.plotly` to make plotly plots reactive: select data with your
cursor on the frontend, get them as a list of dicts in Python!
- This function currently only supports scatter plots.
+ This function currently only supports scatter plots, treemaps charts,
+ and sunbursts charts.
**Example.**