Skip to content

Interface: HoverPoint ​

Experimental

A point a trace reports under the pointer.

Extended by ​

Properties ​

PropertyModifierTypeDescription
cell?readonlyreadonly [number, number]Experimental [row, column] of a grid cell (M4: heatmap, image; Plotly's pointNumber for them). Per-point attributes (text, hovertext, hovertemplate, customdata, hoverinfo) are then 2D arrays read at [row][column], and events report the pair as pointNumber / pointIndex. pointIndex above stays a flat index (row * columns + column).
color?readonlystringExperimental Color the label uses for its border/background (usually the point's color).
distancereadonlynumberExperimental Distance used to rank candidates: px from the pointer (closest) or along the axis (x/y).
extra?readonlystringExperimental Secondary-box text the trace chose, replacing the trace name when the label comes from hoverText (M5: a sankey node's or link's value).
extraText?readonlystringExperimental Lines the trace adds after the x / y and text lines of a label built from hoverinfo (M4 wave 2, Plotly's extraText): a waterfall's change and initial value, a funnel's percentages. Ignored with hoverText or a hovertemplate.
fields?readonlyReadonly<Record<string, unknown>>Experimental Anything else hovertemplate may reference (e.g. marker.size, customdata).
hoverText?readonlystringExperimental Label text the trace built itself from its hoverinfo flags (M2 wave 1), for traces whose hover fields aren't x/y (pie: label, text, value, percent lines, <br>-separated). Replaces the x/y text when there is no hovertemplate; the trace name still follows the name flag.
kind?readonlystringExperimental The kind of element, for traces whose indices restart per kind (M5: sankey 'node' / 'link'): the same pointIndex of another kind is a new hover.
labels?readonlyReadonly<Record<string, string>>Experimental Formatted values hovertemplate uses for a %{name} without a format (M2 wave 1, Plotly's hovertemplateLabels): pie gives percent → '25%' and value → '1,234'.
multi?readonlybooleanExperimental Part of a multi-label hover (M3: box and violin statistics, one label per value, as Plotly): in closest mode, when a point with multi wins, every other multi point its trace returned is shown with it (Plotly keeps all the labels of the closest trace's call).
pointIndexreadonlynumberExperimental Index into the trace's data arrays (first index for aggregated points).
pointIndices?readonlyreadonly number[]Experimental All data indices behind an aggregated point (histogram bins, stacked segments).
pxreadonlynumberExperimental Label anchor in viewport px (bottom-left origin).
pyreadonlynumberExperimental
selects?readonlyreadonly number[]Experimental The points a click on this one selects, where clicks select (clickmode with 'select'), when they are not [pointIndex]: a graph link is not a point of its trace (selectPoints returns node indices), so it selects its two end nodes; an empty list selects nothing.
showName?readonlybooleanExperimental false leaves the trace name out of this label (Plotly names one label of a multi-label hover).
spikeDistance?readonlynumberExperimental Px from the pointer used to pick the point spike lines follow (E3.10, Plotly's spikeDistance). Default: the distance from the pointer to (px, py).
text?readonlystringExperimental
x?readonlyunknownExperimental Values for labels and hovertemplate, in data space.
y?readonlyunknownExperimental

Released under the MIT License.