melihorhanyilmaz Claude Opus 4.7 (1M context) commited on
Commit
3efa3c5
·
1 Parent(s): dd0a6a7

Make dropdown the canonical site picker; remove broken click hint

Browse files

Marimo's auto-attached chart_selection on a layered chart with multiple
data sources doesn't reliably surface clicked rows in chart1.value, so
the linked-detail panel never opened from a scatter click — only the
dropdown actually works. Stop telling the user to click a point: the
header text and the empty/multi-selection prompts now point to the
dropdown only. Legend bucket clicks (which do work) keep their callout.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Files changed (1) hide show
  1. notebook.py +8 -7
notebook.py CHANGED
@@ -123,9 +123,10 @@ def _(mo):
123
  ## Visual 1 — Win-win scatter with linked species breakdown
124
 
125
  Yield × total species richness, coloured by region, sized by coffee dominance
126
- bucket. Median lines split the plot into four quadrants. **Click a point** to
127
- see the species composition of that site below; **click a bucket** in the
128
- dominance legend to filter to that management-intensity band.
 
129
  """)
130
  return
131
 
@@ -214,14 +215,14 @@ def _(alt, chart1, df, mo, pd, site_picker):
214
  sel = chart1.value # pandas DataFrame of currently selected rows
215
  if sel is None or len(sel) == 0:
216
  detail = mo.md(
217
- "*Click a point in the scatter above **or** pick one from the "
218
- "\"Selected site\" dropdown at the top to see the site's species composition.*"
219
  )
220
  elif len(sel) > 1:
221
  detail = mo.md(
222
  f"*{len(sel)} sites currently match the active filters. "
223
- "Click a single point in the scatter above **or** pick one from the "
224
- "\"Selected site\" dropdown to see its species composition.*"
225
  )
226
  else:
227
  site = sel.iloc[0]
 
123
  ## Visual 1 — Win-win scatter with linked species breakdown
124
 
125
  Yield × total species richness, coloured by region, sized by coffee dominance
126
+ bucket. Median lines split the plot into four quadrants. Use the **"Selected
127
+ site" dropdown** at the top to drill into a site's species composition (shown
128
+ below the scatter); **click a bucket** in the dominance legend to filter the
129
+ scatter to that management-intensity band.
130
  """)
131
  return
132
 
 
215
  sel = chart1.value # pandas DataFrame of currently selected rows
216
  if sel is None or len(sel) == 0:
217
  detail = mo.md(
218
+ "*Pick a site from the **\"Selected site\" dropdown** at the top to see its "
219
+ "species composition.*"
220
  )
221
  elif len(sel) > 1:
222
  detail = mo.md(
223
  f"*{len(sel)} sites currently match the active filters. "
224
+ "Pick one from the **\"Selected site\" dropdown** at the top to see its species "
225
+ "composition.*"
226
  )
227
  else:
228
  site = sel.iloc[0]