Skip to content

Interface: TemplateContext ​

Experimental

Where template variables come from. Lookups go in this order; the first defined value wins.

Properties ​

PropertyModifierTypeDescription
data?readonlyunknownExperimental The input trace: %{data.*}.
fullData?readonlyunknownExperimental The defaulted trace: %{fullData.*}, and per-point trace attributes (%{marker.color}).
labels?readonlyReadonly<Record<string, string | undefined>>Experimental Preformatted text per variable name, used when the variable has no format of its own (Plotly formats %{x} / %{y} with the axis' hoverformat this way).
meta?readonlyunknownExperimental %{meta}; defaults to fullData.meta.
pointIndex?readonlynumberExperimental Index used to pick per-point entries of array attributes found on the trace.
values?readonlyReadonly<Record<string, unknown>>Experimental Point values: x, y, text, customdata, pointNumber, marker.size, …

Released under the MIT License.