Documentation / @finchart/core / index / seriesSpec
Function: seriesSpec()
The implementation signature takes the registration type as is.
Since the overloads already sorted out whether deriveKey is required, there's no need to re-discriminate the branch here — pass the spec straight to createEntry and each branch carries its own type along. Having id and deriveKey tacked on doesn't stop it from passing as a registration.
Call Signature
seriesSpec<
TSource>(spec):SeriesSpec<TSource>
Defined in: packages/core/src/registration/series-spec.ts:83
Turns one registration into a spec closed over TPoint.
Two overloads, because: without a derivation, TPoint is just TSource, so series alone suffices; with one, the three of series, derive, and coordinates need to be tied together by TPoint. The call site infers that relationship, so no as is needed.
Type Parameters
TSource
TSource extends BaseDataPoint
Parameters
spec
color?
string
data?
TSource[]
id
string
name?
string
readout?
boolean
series
Series<TSource>
zIndex?
number
Returns
SeriesSpec<TSource>
Call Signature
seriesSpec<
TSource,TPoint>(spec):SeriesSpec<TSource>
Defined in: packages/core/src/registration/series-spec.ts:93
Turns one registration into a spec closed over TPoint.
Two overloads, because: without a derivation, TPoint is just TSource, so series alone suffices; with one, the three of series, derive, and coordinates need to be tied together by TPoint. The call site infers that relationship, so no as is needed.
Type Parameters
TSource
TSource extends BaseDataPoint
TPoint
TPoint extends BaseDataPoint
Parameters
spec
color?
string
coordinates?
CoordinateAccessor<TPoint>
data?
TSource[]
derive
(source) => TPoint[]
deriveKey
readonly unknown[]
Required whenever there's a derivation — without it, everything recomputes on every update.
id
string
name?
string
readout?
boolean
series
Series<TPoint>
zIndex?
number
Returns
SeriesSpec<TSource>
Call Signature
seriesSpec<
TPoint>(spec):SeriesSpec<never>
Defined in: packages/core/src/registration/series-spec.ts:110
Turns one registration into a spec closed over TPoint.
Two overloads, because: without a derivation, TPoint is just TSource, so series alone suffices; with one, the three of series, derive, and coordinates need to be tied together by TPoint. The call site infers that relationship, so no as is needed.
Type Parameters
TPoint
TPoint extends BaseDataPoint
Parameters
spec
color?
string
coordinates?
CoordinateAccessor<TPoint>
id
string
input
Source<TPoint>
Draws points someone else made — a computed node's branch (node.out.*) arrives here.
name?
string
readout?
boolean
series
Series<TPoint>
zIndex?
number
Returns
SeriesSpec<never>