Skip to content

Interface: KeyboardPoint ​

Experimental

A stop of keyboard navigation (see TraceModule.keyboardPoints): the hover point whose label it shows, and what navigation needs beyond it.

Extends ​

Properties ​

PropertyModifierTypeDescriptionInherited from
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).HoverPoint.cell
click?readonlybooleanExperimental Enter on this stop is first a click on the trace's view at the stop's anchor (TraceView.handlePointer with a click), also when the trace is on cartesian axes: a graph tree folds or unfolds a node. Without it only the views of traces that are not on cartesian axes are offered the click. A click the view does not take goes on as the chart's click. When the pipeline run that follows changes what the stop says, it is announced again.-
color?readonlystringExperimental Color the label uses for its border/background (usually the point's color).HoverPoint.color
distancereadonlynumberExperimental Distance used to rank candidates: px from the pointer (closest) or along the axis (x/y).HoverPoint.distance
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).HoverPoint.extra
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.HoverPoint.extraText
fields?readonlyReadonly<Record<string, unknown>>Experimental Anything else hovertemplate may reference (e.g. marker.size, customdata).HoverPoint.fields
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.HoverPoint.hoverText
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.HoverPoint.kind
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'.HoverPoint.labels
more?readonlyreadonly HoverPoint[]Experimental Hover points shown and announced with this one (the other statistics of a box).-
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).HoverPoint.multi
nav?readonlyreadonly (number | undefined)[]Experimental The stops ←, →, ↑, ↓, Home and End lead to from this one, as indices into the trace's stops (this stop's own index to stay). Default, also for missing entries: ← / ↑ the previous stop, → / ↓ the next, Home / End the first / last.-
pointIndexreadonlynumberExperimental Index into the trace's data arrays (first index for aggregated points).HoverPoint.pointIndex
pointIndices?readonlyreadonly number[]Experimental All data indices behind an aggregated point (histogram bins, stacked segments).HoverPoint.pointIndices
pxreadonlynumberExperimental Label anchor in viewport px (bottom-left origin).HoverPoint.px
pyreadonlynumberExperimentalHoverPoint.py
say?readonlyreadonly [string, Readonly<Record<string, string>> | undefined]Experimental The announcement of this stop instead of "{name}: {text}, point {n} of {count}.": an English sentence template, which is also its key in a locale dictionary, and values for its placeholders. The runtime fills in {name}, {text}, {n} and {count} unless given.-
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.HoverPoint.selects
showName?readonlybooleanExperimental false leaves the trace name out of this label (Plotly names one label of a multi-label hover).HoverPoint.showName
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).HoverPoint.spikeDistance
text?readonlystringExperimentalHoverPoint.text
x?readonlyunknownExperimental Values for labels and hovertemplate, in data space.HoverPoint.x
y?readonlyunknownExperimentalHoverPoint.y

Released under the MIT License.