Skip to content

Documentation / @finchart/core / SeriesSpec

Interface: SeriesSpec<TSource>

Defined in: packages/core/src/plot/pane.ts:326

spec 배열에 담기는 시리즈 하나.

점 타입이 data 한 곳에만 남는다. 배열 원소마다 파생 결과 타입이 다르므로 원소 타입 하나로는 적을 수 없다 — Entry와 같은 수를 쓴다. seriesSpec()이 그 타입을 닫고, 밖에는 신원(id)과 갱신 판정에 필요한 것만 남는다.

TSource공변 자리에만 있어서(data) SeriesSpec<OHLC>SeriesSpec 자리에 그대로 넣을 수 있다. pane이 목록을 받을 때 쓰는 성질이다.

Type Parameters

TSource

TSource extends BaseDataPoint = BaseDataPoint

Properties

data?

readonly optional data?: TSource[]

Defined in: packages/core/src/plot/pane.ts:349

이 시리즈가 그릴 데이터. 참조가 바뀌면 갱신으로 친다.

목록을 다시 넘기는 것으로 "교체"와 "앞에 붙임"을 구별할 수 없으므로 여기 오는 것은 언제나 교체다. 대신 리핏하지 않는다 — 선언형에서 데이터가 자라는 것은 무한 스크롤이고, 그때 창이 튀면 안 된다. 증분과 리핏이 필요하면 명령형 SeriesHandle을 쓴다.


deriveKey?

readonly optional deriveKey?: readonly unknown[]

Defined in: packages/core/src/plot/pane.ts:339

파생을 다시 돌릴지 정하는 값들. 파생이 없으면 undefined.


id

readonly id: string

Defined in: packages/core/src/plot/pane.ts:328

갱신 때 짝을 찾는 신원. 인덱스로는 조건부 삽입에서 조용히 틀린다.


input?

readonly optional input?: Source<BaseDataPoint>

Defined in: packages/core/src/plot/pane.ts:356

남의 출력을 그리는 등록의 입력 — 선언형의 세 번째 모드. 참조가 신원이다 — 바뀌면 entry를 다시 세운다. 데이터를 소유하지 않으므로 data·deriveKey와 공존하지 않는다.


series

readonly series: unknown

Defined in: packages/core/src/plot/pane.ts:336

신원이 같을 때 갈아 끼울 대상. 점 타입은 지워져 있다.

Series는 무상태여야 한다 — 갈아 끼우면 내부 상태가 날아간다. 상태를 드는 것(십자선 등)은 시리즈가 아니라 장식으로 간다.


toEntry

readonly toEntry: (createDataManager) => Entry

Defined in: packages/core/src/plot/pane.ts:359

Pane이 Entry로 닫을 때 쓴다. 점 타입은 이 함수 안에서만 구체적이다.

Parameters

createDataManager

DataManagerFactory

Returns

Entry