OPEN_GRID API - v1.3.1
    Preparing search index...

    Interface ChartInstance

    grid.createChart()가 반환하는, 살아있는 차트를 다루는 핸들. 실제 구현체는 ChartManager. 이 핸들로 타입 전환·갱신·이미지 추출·파기까지 차트의 생애주기 전체를 조작한다. / The handle returned by grid.createChart() for controlling a live chart; implemented by ChartManager. Use it to change type, refresh, export an image, and destroy — the chart's whole lifecycle.

    interface ChartInstance {
        id: string;
        destroy(): void;
        getModel(): ChartDataModel;
        on(ev: "chartRender" | "chartPointClick", cb: (...a: any[]) => void): void;
        refresh(): void;
        setType(type: ChartType): void;
        toBlob(mime?: string): Promise<Blob | null>;
        update(patch?: Partial<ChartConfig>): void;
    }
    Index

    Properties

    id: string

    차트 인스턴스 id. / Chart instance id.

    Methods

    • 차트 인스턴스 파기. / Destroy the chart instance.

      Returns void

    • 현재 데이터 모델 반환. / Return the current data model.

      Returns ChartDataModel

    • 차트 이벤트 리스너 등록. / Register a chart event listener.

      Parameters

      • ev: "chartRender" | "chartPointClick"
      • cb: (...a: any[]) => void

      Returns void

    • 모델을 재추출하고 렌더 스펙(테마 포함)을 다시 계산해 재렌더한다. / Re-extract the model and recompute the render spec (incl. theme), then re-render.

      그리드는 테마가 바뀌어도 별도 이벤트를 발행하지 않는다(setTheme/setThemeVar는 CSS만 갱신). 그래서 다크모드 토글처럼 데이터는 그대로고 테마만 바뀐 경우, 열려 있는 각 차트에 대해 이 메서드를 직접 호출해야 새 테마(색·글꼴·팔레트)가 반영된다. update()/setType()도 내부적으로 이 경로를 그대로 탄다. / The grid doesn't emit a dedicated event when only the theme changes (setTheme/ setThemeVar update CSS only). So after a pure theme switch with no data change — e.g. a dark-mode toggle — call this on each open chart to apply the new theme (colors, fonts, palette). update() and setType() internally follow the same path.

      Returns void

    • 차트 타입 변경. / Change the chart type.

      Parameters

      Returns void

    • 현재 렌더를 이미지 Blob 으로. / Export current render as an image Blob.

      Parameters

      • Optionalmime: string

      Returns Promise<Blob | null>

    • 설정 패치 후 갱신. / Patch config and update.

      Parameters

      Returns void