Closed flekschas closed 1 year ago
@insertmike Since we've talked about avoiding the flicker upon drawing new points and filtering them down, what do you think of this addition?
think we should expose this in the README doc too. Otherwise we risk letting it die in the README. Except if this is built automatically by the build script (haven't looked at).
Good call! I updated the README to reflect the new draw()
signature
This PR adds the ability to hover, select, and filter points at the time when
draw()
is called.Description
I added three new properties to the draw options:
hover
,select
, andfilter
. Those options allow to immediately hover, select, or filter points as they are drawn. E.g.:In the above example, upon drawing the three points, the first point is hovered and selected and the last point is filtered out. While we also attempted to select the last point it's not going to be selected because we filter it out.
For convenience, this PR also expose
hoveredPoint
viascatterplot.get('hoveredPoint')
.Previously, one had to filter after the draw call which leds to flickering as shown in the gif.
Now, one can directly hover, select, and filter at the time of drawing the points, which avoid the flickering.
Checklist
CHANGELOG.md
updatedREADME.md
added or updated