Documentation / @finchart/core / createPlotModel
Function: createPlotModel()
createPlotModel<
T>(options):PlotModel
Defined in: packages/core/src/plot/model.ts:72
DOM도 캔버스도 없는 무대.
서버 렌더·worker·테스트·다른 표면의 진입점이다. 브라우저 진입점 (browserDeps + PlotBuilder)과 같은 Plot을 세운다 — 모델이 별도 클래스가 아니라 배선이라서, 두 벌 관리가 없다.
ts
// showGrid를 끈다 — 안 끄면 그리드도 drawLine이라 첫 줄이 그리드 선이다.
const model = createPlotModel({
size,
series: { series: lineSeries(), data },
config: { showGrid: false },
});
const [line] = model.commands().filter((c) => c.type === "drawLine");기본 배선: 메모리 레이어 · recording 렌더러 · 빈 StyleReader(색은 코드 폴백 — 테마는 config.style이나 deps.createStyleReader로) · 캔버스 눈금 라벨(끄려면 config.axis.showLabels). 측정자는 기본 없음 — 축 폭은 고정 폴백이고, 폰트 메트릭을 아는 환경이 deps.createTextMeasurer로 넣는다.
Type Parameters
T
T extends BaseDataPoint = BaseDataPoint