Skip to content

Function: graphPath() ​

ts
function graphPath(trace): GraphPathInfo | undefined;

Experimental

The path a graph trace highlights: between the two nodes of highlight.path, else between the two selected nodes (selectedpoints) when exactly two are and highlight.mode has 'path'. trace is a defaulted trace, chart.fullData[i], which holds the selection made on the chart; read it in a selected listener or after an update. undefined: no path is asked for, or there is none between the two nodes.

It counts every node of the trace; the chart leaves out the nodes that are not drawn (a group hidden through the legend, a folded subtree).

Parameters ​

ParameterType
traceReadonly<Record<string, unknown>>

Returns ​

GraphPathInfo | undefined

Released under the MIT License.