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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
docs: add treemaps charts and sunbursts to plotly
Myles Scolnick6a9fe12801d8
diff --git a/docs/api/plotting.md b/docs/api/plotting.mdindex 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: warningmarimo 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 ofselection, consider using [`mo.ui.altair_chart`](#marimo.ui.altair_chart).```diff --git a/docs/guides/plotting.md b/docs/guides/plotting.mdindex 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: warningReactive plots currently require Altair or Plotly. Install with `pip installaltair` 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 supportsa 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: warningmarimo 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 ofselection, consider using [`mo.ui.altair_chart`](#marimo.ui.altair_chart).```-```{eval-rst}.. marimo-embed:::size: largediff --git a/marimo/_plugins/ui/_impl/plotly.py b/marimo/_plugins/ui/_impl/plotly.pyindex 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 yourcursor 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.**