Appearance
BSP
The BSP
is a renderless component that creates a Binary Space Parition of the provided points that can be used for quick querying such as needed by tooltips.
If either of props.ignoreXValues
or props.ignoreYValues
is true
, then BSP will fall back to a 1-dimensional BTree
over whichever axis isn't ignored. Then the default slot will receive points that are near the mouse, ignoring the correct dimension.
If neither axis is ignored, then a 2-dimensional KDTree
will be used.
See the LinePlot
docs for an example
Props
name | type | default | required | description |
---|---|---|---|---|
screenPoints | NumericPoint | N/A | 🗹 | screen points |
ignoreXValues | boolean | false | ☐ | When true, builds a BTree over Y axis values, and only searches for nearestPoints on the Y axis |
ignoreYValues | boolean | false | ☐ | When true, builds a BTree over X axis values, and only searches for nearestPoints on the X axis |
points | Point[] | [] | ☐ | The points in data-space over which the BSP index will be built |
trackNearestPoint | boolean | true | ☐ | When true, the default slot's nearestPoint prop will be updated based on mouse location |
Slots
default
The default slot will have access to the built screenspace index
prop | type | comment |
---|---|---|
screenPoints | Point[] | all points (after decimation) in screen space |
nearestPoint | NearestPoint | null | Record containing the nearest point in both screen and dataspace to the mouse NOTE this prop is only updated if the trackNearestPoint prop is true |