Documentation / @finchart/core / SeriesRegistration
Type Alias: SeriesRegistration<TSource, TPoint>
SeriesRegistration<
TSource,TPoint> =PlainRegistration<TSource> |DerivedRegistration<TSource,TPoint> |InputRegistration<TPoint>
Defined in: packages/core/src/plot/entry.ts:165
시리즈 하나를 무대에 얹는 법. 그릴 점이 어디서 오는지로 셋으로 갈린다. 갈래를 나누면 각 갈래가 자기 관계를 못 박는다: { series: lineSeries(), data: candles }처럼 점 타입이 안 맞는 조합을 컴파일에서 막는다.
| 갈래 | series | 데이터 |
|---|---|---|
| 그대로 | Series<TSource> | 자기 것 |
| 파생 | Series<TPoint> | 자기 것(derive의 입력) |
| 입력 | Series<TPoint> | 남의 것 |
derive?: undefined·input?: undefined가 판별자다. 이게 없으면 TS가 셋 중 아무 데나 맞춰 주므로 잘못된 조합이 다시 새어 나간다.
Type Parameters
TSource
TSource extends BaseDataPoint
TPoint
TPoint extends BaseDataPoint = TSource