Documentation / @finchart/core / seriesSpec
Function: seriesSpec()
구현 시그니처는 등록 타입을 그대로 받는다.
오버로드가 deriveKey 필수 여부를 밖에서 이미 갈라 놨으므로, 여기서는 갈래를 다시 판별할 필요가 없다 — spec을 그대로 createEntry에 넘기면 각 갈래가 자기 타입을 들고 간다. id·deriveKey가 더 붙어 있어도 등록으로 통한다.
Call Signature
seriesSpec<
TSource>(spec):SeriesSpec<TSource>
Defined in: packages/core/src/plot/pane.ts:369
등록 하나를 TPoint가 닫힌 spec으로 만든다.
오버로드가 둘인 이유: 파생이 없으면 TPoint는 곧 TSource라 series만 받으면 되고, 파생이 있으면 셋(series·derive·coordinates)이 TPoint로 묶여야 한다. 호출부에서 그 관계가 추론되므로 as가 필요 없다.
Type Parameters
TSource
TSource extends BaseDataPoint
Parameters
spec
color?
string
data?
TSource[]
id
string
name?
string
series
Series<TSource>
zIndex?
number
Returns
SeriesSpec<TSource>
Call Signature
seriesSpec<
TSource,TPoint>(spec):SeriesSpec<TSource>
Defined in: packages/core/src/plot/pane.ts:378
등록 하나를 TPoint가 닫힌 spec으로 만든다.
오버로드가 둘인 이유: 파생이 없으면 TPoint는 곧 TSource라 series만 받으면 되고, 파생이 있으면 셋(series·derive·coordinates)이 TPoint로 묶여야 한다. 호출부에서 그 관계가 추론되므로 as가 필요 없다.
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[]
파생이 있으면 필수다 — 없으면 매 갱신마다 전부 다시 계산한다.
id
string
name?
string
series
Series<TPoint>
zIndex?
number
Returns
SeriesSpec<TSource>
Call Signature
seriesSpec<
TPoint>(spec):SeriesSpec<never>
Defined in: packages/core/src/plot/pane.ts:394
등록 하나를 TPoint가 닫힌 spec으로 만든다.
오버로드가 둘인 이유: 파생이 없으면 TPoint는 곧 TSource라 series만 받으면 되고, 파생이 있으면 셋(series·derive·coordinates)이 TPoint로 묶여야 한다. 호출부에서 그 관계가 추론되므로 as가 필요 없다.
Type Parameters
TPoint
TPoint extends BaseDataPoint
Parameters
spec
color?
string
coordinates?
CoordinateAccessor<TPoint>
id
string
input
Source<TPoint>
남이 만든 점을 그린다 — 계산 노드의 갈래(node.out.*)가 여기 온다.
name?
string
series
Series<TPoint>
zIndex?
number
Returns
SeriesSpec<never>