-
Notifications
You must be signed in to change notification settings - Fork 857
Description
Describe the bug
I want to make an Altair heatmap then use the alt.selection_point() method to do interactive selection of individual points, however the selected results incorrectly included non-selected points, which are "diagonal" to the selected ones.
Steps to reproduce:
Make an Altair chart with mark_rect()
Configure chart with alt.selection_point()
Shift-click to select two points, with both x and y different
Use chart.value to inspect selection results
Expected outcome:
chart.value should have two rows, one for each selected point
Actual outcome:
chart.value has four rows, two correct ones, two incorrect ones with inverted x and y
Selecting three or more points results in more convoluted outcomes. All the points together seem to form cartesian products.
I used Marimo AI to generate mock examples and can also reproduce this bug, provided below. So I'm sure it's not problem of just my own code.
Will you submit a PR?
- Yes
Environment
Details
(Not needed, check below)
Code to reproduce
(Marimo AI generated example. Pandas-related cell warnings are irrelevant. My own code used Polars only and the bug stays the same.)
Marimo App permalink:
https://marimo.app/?slug=03ny54