How hover works
Hit-testing runs in the engine, and which query answers depends on the geom:- Banded and bucketed cartesian geoms — bars, lines, areas — snap along the main axis: the coordinate the categories or buckets run along, which is x for a vertical bar or line chart and y for a horizontal bar chart. The cursor never has to land exactly on an observation, which is why a line chart responds smoothly between vertices. Everything at that main-axis position highlights together — every segment in a stack, every series in a multi-line chart — and the tooltip lists their values in legend order.
- Point layers — scatter — use nearest-neighbour in 2D, so the closest marker wins rather than the nearest column.
- Polar charts — pie and donut — hit-test the enclosing arc: the slice the cursor is inside.
- Grid layers — heatmaps — hit-test the enclosing cell, over its full band rather than the inset tile painted inside it. Cells the data leaves empty answer no hover.
interactive: false — useful for a decorative point overlay that shouldn’t compete with the line beneath it:
Restyling hover and dimming
Hover and de-emphasis are painted through two style states,hovered and dimmed, that any geom entry can scope to. dimmed covers both cases where an element steps back — a highlight matched something else, or the pointer is on another element. States are paint-only: they never feed layout, so nothing moves when the pointer does.
dimmed drops a mark to alpha: 0.4, and hovered bars and points gain a white affordance border. See Styling for the full cascade.
Tooltips
Tooltips are on by default. Turn them off withshowTooltips:
Tooltip slot. It receives TooltipSlotProps — a single content prop carrying the render-ready rows the default tooltip gets, already formatted. Positioning stays built in. DefaultTooltip is exported, so a custom tooltip can wrap it rather than rebuild it:
Animation
A graph animates by default: an intro entrance on first mount, and transitions between compiled states when the data or a config value changes. Passanimation to turn either kind off, or to tune the intro:
boolean
default:"true"
Whether the entrance plays at all. Passing
intro: false is the same thing.number
default:"1"
Multiplier applied to every entrance duration and stagger delay.
boolean
default:"true"
Whether geoms that support a staggered entrance enter one after another rather
than all at once.
IntroStaggerOrder
default:"main-axis"
The order staggered point geoms enter in. Bars and slices always enter in
visual order.
number
default:"1500"
Total geom count across all layers above which the entrance is skipped
entirely — which is why a very dense chart appears without animating.
Related
- Styling — the
hoveredanddimmedstates, and everything else the chart paints - Slots — replace the tooltip or other regions
- Provider & renderer —
showTooltips,animation,mode

