Skip to content

Documentation / @ripl/charts / resolveLineStyle

Function: resolveLineStyle() ​

resolveLineStyle<TData>(style, data, getKey): ResolvedLineStyle

Defined in: charts/src/core/options.ts:842

Resolves a LineStyleInput against the chart data into the dash state that draws it: the dash pattern for the line as a whole, plus the point-index spans that override it.

Segments whose from or to matches no key in the data are dropped rather than throwing, so a data change that removes a boundary leaves the rest of the line intact.

Type Parameters ​

Type Parameter
TData

Parameters ​

ParameterTypeDescription
styleLineStyleInput<TData> | undefinedThe series' lineStyle option.
dataTData[]The dataset being plotted, in render order.
getKey(item) => stringResolves a data item to its category key.

Returns ​

ResolvedLineStyle

The polyline lineDash and, when the style is segmented, its segments.