open-grid 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,131 @@
1
1
  import { CellRange } from '../types.js';
2
2
  /**
3
- * 그리드 데이터를 어떤 모양의 차트로 그릴지 고르는 값. / Picks which shape of chart to draw the
4
- * grid data as.
3
+ * 그리드 데이터를 어떤 모양의 차트로 그릴지 고르는 값.
4
+ *
5
+ * Picks which shape of chart to draw the grid data as.
6
+ *
7
+ * グリッドのデータをどの形のチャートで描くかを選ぶ値。
8
+ *
9
+ * 用于选择把表格数据绘制成哪种形态的图表。
5
10
  *
6
11
  * 현재(Phase1 MVP) 실제로 렌더되는 값은 'bar'|'line' 뿐이다. 나머지는 Phase2/3 를 위해 타입만
7
12
  * 미리 선언해 둔 예약값이며 아직 구현되지 않았다.
8
- * / Right now (Phase1 MVP) only 'bar' and 'line' actually render. The rest are reserved values —
13
+ *
14
+ * Right now (Phase1 MVP) only 'bar' and 'line' actually render. The rest are reserved values —
9
15
  * the type exists for Phase2/3 but nothing implements them yet.
10
16
  *
17
+ * 現在(Phase1 MVP)実際にレンダリングされる値は 'bar'|'line' だけです。残りは Phase2/3 のために
18
+ * 型だけをあらかじめ宣言しておいた予約値であり、まだ実装されていません。
19
+ *
20
+ * 目前(Phase1 MVP)真正渲染的值只有 'bar'|'line'。其余是为 Phase2/3 预先声明类型的保留值,
21
+ * 尚未实现。
22
+ *
11
23
  * ⚠️ 'bar-stacked': 공개 타입으로는 노출돼 있지만, 내장(builtin-canvas) 렌더러는 아직 누적
12
24
  * 스택을 그리지 못한다 — 지정해도 'bar-grouped'와 똑같이 그룹형(막대를 나란히)으로 대신
13
25
  * 그려진다. 하위 호환을 위해(이미 이 값을 쓰는 코드가 깨지지 않도록) 타입 자체는 남겨 둔다.
14
- * / ⚠️ 'bar-stacked': exposed as a public type, but the built-in canvas renderer can't draw a
26
+ *
27
+ * ⚠️ 'bar-stacked': exposed as a public type, but the built-in canvas renderer can't draw a
15
28
  * stacked bar yet — specifying it falls back to the same grouped (side-by-side) rendering as
16
29
  * 'bar-grouped'. The type itself is kept for backward compatibility, so existing code using this
17
30
  * value doesn't break.
31
+ *
32
+ * ⚠️ 'bar-stacked': 公開型としては露出していますが、内蔵(builtin-canvas)レンダラーはまだ積み上げ
33
+ * スタックを描けません — 指定しても 'bar-grouped' と同じくグループ型(棒を横に並べる)で代わりに
34
+ * 描かれます。下位互換のため(すでにこの値を使っているコードが壊れないように)型自体は残して
35
+ * あります。
36
+ *
37
+ * ⚠️ 'bar-stacked':虽然作为公开类型对外暴露,但内置(builtin-canvas)渲染器还画不出堆叠 —
38
+ * 即使指定它,也会像 'bar-grouped' 一样以分组形态(柱子并排)代为绘制。为了向后兼容
39
+ * (不让已经使用该值的代码出错),类型本身予以保留。
18
40
  */
19
41
  export type ChartType = 'bar' | 'line' | 'area' | 'pie' | 'doughnut' | 'bar-stacked' | 'bar-grouped';
20
- /** 시리즈(컬럼) 명세. / Series (column) spec. */
42
+ /**
43
+ * 시리즈(컬럼) 명세.
44
+ *
45
+ * Series (column) spec.
46
+ *
47
+ * シリーズ(列)の仕様。
48
+ *
49
+ * 系列(列)的规格。
50
+ */
21
51
  export interface ChartSeriesSpec {
22
- /** 값 컬럼 field 명. / Value column field name. */
52
+ /**
53
+ * 값 컬럼 field 명.
54
+ *
55
+ * Value column field name.
56
+ *
57
+ * 値の列の field 名。
58
+ *
59
+ * 值列的 field 名。
60
+ */
23
61
  field: string;
24
- /** 범례 라벨(기본 = 컬럼 header/field). / Legend label (default = column header/field). */
62
+ /**
63
+ * 범례 라벨(기본 = 컬럼 header/field).
64
+ *
65
+ * Legend label (default = column header/field).
66
+ *
67
+ * 凡例のラベル(既定 = 列の header/field)。
68
+ *
69
+ * 图例标签(默认 = 列的 header/field)。
70
+ */
25
71
  name?: string;
26
- /** 시리즈 색. / Series color. */
72
+ /**
73
+ * 시리즈 색.
74
+ *
75
+ * Series color.
76
+ *
77
+ * シリーズの色。
78
+ *
79
+ * 系列的颜色。
80
+ */
27
81
  color?: string;
28
- /** 색 외 구분 패턴. / Non-color distinction pattern. */
82
+ /**
83
+ * 색 외 구분 패턴.
84
+ *
85
+ * Non-color distinction pattern.
86
+ *
87
+ * 色以外の区別パターン。
88
+ *
89
+ * 颜色之外的区分图案。
90
+ */
29
91
  pattern?: ChartSeries['pattern'];
30
- /** 시리즈별 렌더 타입(혼합 차트). / Per-series render type (mixed charts). */
92
+ /**
93
+ * 시리즈별 렌더 타입(혼합 차트).
94
+ *
95
+ * Per-series render type (mixed charts).
96
+ *
97
+ * シリーズごとのレンダータイプ(混合チャート)。
98
+ *
99
+ * 每个系列的渲染类型(混合图表)。
100
+ */
31
101
  type?: 'bar' | 'line' | 'area';
32
102
  }
33
103
  /**
34
104
  * 차트 파이프라인의 첫 단계 — "그리드의 어느 데이터를 그릴 것인가"를 고른다.
35
- * / The first stage of the chart pipeline — picks which grid data to draw.
105
+ *
106
+ * The first stage of the chart pipeline — picks which grid data to draw.
107
+ *
108
+ * チャートパイプラインの最初の段階 — 「グリッドのどのデータを描くか」を選びます。
109
+ *
110
+ * 图表流水线的第一个阶段 — 选择「绘制表格的哪些数据」。
36
111
  *
37
112
  * `'range'`(지정 범위)·`'selection'`(현재 드래그 선택)·`'checked'`(체크된 행)·`'all'`(전체
38
113
  * 데이터) 는 "사용자가 화면에서 고른 것을 그대로 차트로" 만들 때 쓰고, `'columns'` 는 화면 선택과
39
114
  * 무관하게 카테고리/시리즈 컬럼을 코드로 직접 지정하고 싶을 때 쓴다.
40
- * / `'range'` (a given cell range), `'selection'` (the current drag selection), `'checked'`
115
+ *
116
+ * `'range'` (a given cell range), `'selection'` (the current drag selection), `'checked'`
41
117
  * (checked rows), and `'all'` (the whole dataset) turn whatever the user picked on screen
42
118
  * straight into a chart. `'columns'` is for when you want to specify the category/series columns
43
119
  * in code, independent of any on-screen selection.
120
+ *
121
+ * `'range'`(指定した範囲)・`'selection'`(現在のドラッグ選択)・`'checked'`(チェックされた行)・
122
+ * `'all'`(全データ)は「ユーザーが画面で選んだものをそのままチャートに」するときに使い、
123
+ * `'columns'` は画面の選択とは無関係にカテゴリー/シリーズの列をコードで直接指定したいときに
124
+ * 使います。
125
+ *
126
+ * `'range'`(指定范围)、`'selection'`(当前拖拽选择)、`'checked'`(勾选的行)、`'all'`
127
+ * (全部数据)用于把「用户在界面上选中的内容」原样做成图表;`'columns'` 用于不依赖界面选择、
128
+ * 在代码中直接指定类别/系列列的场景。
44
129
  */
45
130
  export type ChartSource = {
46
131
  kind: 'range';
@@ -56,104 +141,423 @@ export type ChartSource = {
56
141
  category?: string;
57
142
  series: Array<string | ChartSeriesSpec>;
58
143
  };
59
- /** 카테고리 집계 연산. / Category aggregation operation. */
144
+ /**
145
+ * 카테고리 집계 연산.
146
+ *
147
+ * Category aggregation operation.
148
+ *
149
+ * カテゴリーの集計演算。
150
+ *
151
+ * 类别的聚合运算。
152
+ */
60
153
  export type ChartAggregateOp = 'sum' | 'avg' | 'count' | 'min' | 'max';
61
- /** 집계 연산 또는 커스텀 리듀서. / An aggregation op or a custom reducer. */
154
+ /**
155
+ * 집계 연산 또는 커스텀 리듀서.
156
+ *
157
+ * An aggregation op or a custom reducer.
158
+ *
159
+ * 集計演算、またはカスタムリデューサー。
160
+ *
161
+ * 聚合运算,或自定义归约器。
162
+ */
62
163
  export type ChartAggregate = ChartAggregateOp | ((values: number[], category: string) => number);
63
- /** 접근성(SR) 테이블 모델 — 스크린리더 폴백. / Accessibility (SR) table model — screen-reader fallback. */
164
+ /**
165
+ * 접근성(SR) 테이블 모델 — 스크린리더 폴백.
166
+ *
167
+ * Accessibility (SR) table model — screen-reader fallback.
168
+ *
169
+ * アクセシビリティ(SR)のテーブルモデル — スクリーンリーダー向けフォールバック。
170
+ *
171
+ * 无障碍(SR)表格模型 — 面向屏幕阅读器的回退。
172
+ */
64
173
  export interface A11yTableModel {
65
- /** aria-label 요약 캡션. / aria-label summary caption. */
174
+ /**
175
+ * aria-label 요약 캡션.
176
+ *
177
+ * aria-label summary caption.
178
+ *
179
+ * aria-label の要約キャプション。
180
+ *
181
+ * aria-label 的摘要标题。
182
+ */
66
183
  caption: string;
67
184
  /** ['category', ...series names] */
68
185
  colHeaders: string[];
69
- /** [category, v1, v2, ...] — locale 포맷 문자열. / [category, v1, v2, ...] — locale-formatted strings. */
186
+ /**
187
+ * [category, v1, v2, ...] — locale 포맷 문자열.
188
+ *
189
+ * [category, v1, v2, ...] — locale-formatted strings.
190
+ *
191
+ * [category, v1, v2, ...] — locale 書式の文字列。
192
+ *
193
+ * [category, v1, v2, ...] — 按 locale 格式化的字符串。
194
+ */
70
195
  rows: string[][];
71
196
  }
72
- /** 차트 시리즈(정규화된 값 배열). / Chart series (normalized value array). */
197
+ /**
198
+ * 차트 시리즈(정규화된 값 배열).
199
+ *
200
+ * Chart series (normalized value array).
201
+ *
202
+ * チャートのシリーズ(正規化された値の配列)。
203
+ *
204
+ * 图表系列(规范化后的值数组)。
205
+ */
73
206
  export interface ChartSeries {
74
- /** 범례 라벨(기본값 = 원본 컬럼 header/field). / Legend label (default = source column header/field). */
207
+ /**
208
+ * 범례 라벨(기본값 = 원본 컬럼 header/field).
209
+ *
210
+ * Legend label (default = source column header/field).
211
+ *
212
+ * 凡例のラベル(既定値 = 元の列の header/field)。
213
+ *
214
+ * 图例标签(默认值 = 源列的 header/field)。
215
+ */
75
216
  name: string;
76
- /** categories 와 동일 순서로 정렬. 결측=null. / Aligned to categories order; missing = null. */
217
+ /**
218
+ * categories 와 동일 순서로 정렬. 결측=null.
219
+ *
220
+ * Aligned to categories order; missing = null.
221
+ *
222
+ * categories と同じ順序に整列。欠測 = null。
223
+ *
224
+ * 与 categories 的顺序对齐;缺失 = null。
225
+ */
77
226
  data: Array<number | null>;
78
- /** 시리즈 색. / Series color. */
227
+ /**
228
+ * 시리즈 색.
229
+ *
230
+ * Series color.
231
+ *
232
+ * シリーズの色。
233
+ *
234
+ * 系列的颜色。
235
+ */
79
236
  color?: string;
80
- /** 색만으로 시리즈를 구분하기 어려운 사용자(색약 등)를 위해, 색과 함께(또는 색 대신) 채움
237
+ /**
238
+ * 색만으로 시리즈를 구분하기 어려운 사용자(색약 등)를 위해, 색과 함께(또는 색 대신) 채움
81
239
  * 무늬로도 시리즈를 구분한다. 'solid'=무늬 없음(기본), 'hatch'=사선, 'dot'=점, 'cross'=십자.
82
- * / A fill pattern that distinguishes series by shape, not just color — for viewers who can't
83
- * rely on color alone (color-vision deficiency, etc.). 'solid' = no pattern (default),
84
- * 'hatch' = diagonal lines, 'dot' = dots, 'cross' = crosshatch. */
240
+ *
241
+ * A fill pattern that distinguishes series alongside color — or in place of it — for viewers
242
+ * who can't rely on color alone (color-vision deficiency, etc.). 'solid' = no pattern
243
+ * (default), 'hatch' = diagonal lines, 'dot' = dots, 'cross' = crosshatch.
244
+ *
245
+ * 色だけではシリーズを区別しにくいユーザー(色覚特性など)のために、色とともに(または色の
246
+ * 代わりに)塗りの模様でもシリーズを区別します。'solid'=模様なし(既定)、'hatch'=斜線、
247
+ * 'dot'=点、'cross'=十字。
248
+ *
249
+ * 为仅凭颜色难以区分系列的用户(色觉障碍等),在颜色之外(或代替颜色)再用填充图案来区分
250
+ * 系列。'solid' = 无图案(默认),'hatch' = 斜线,'dot' = 点,'cross' = 十字。
251
+ */
85
252
  pattern?: 'solid' | 'hatch' | 'dot' | 'cross';
86
253
  }
87
- /** 차트 데이터 모델 메타(출처·샘플링·집계 배지 정보). / Chart data model meta (source, sampling, aggregation badge info). */
254
+ /**
255
+ * 차트 데이터 모델 메타(출처·샘플링·집계 배지 정보).
256
+ *
257
+ * Chart data model meta (source, sampling, aggregation badge info).
258
+ *
259
+ * チャートデータモデルのメタ(出所・サンプリング・集計バッジの情報)。
260
+ *
261
+ * 图表数据模型的元信息(来源、采样、聚合徽章的信息)。
262
+ */
88
263
  export interface ChartDataModelMeta {
89
- /** 소스 종류. / Source kind. */
264
+ /**
265
+ * 소스 종류.
266
+ *
267
+ * Source kind.
268
+ *
269
+ * ソースの種類。
270
+ *
271
+ * 数据源的种类。
272
+ */
90
273
  sourceKind: ChartSource['kind'];
91
- /** 원본 포인트(행) 수. / Original point (row) count. */
274
+ /**
275
+ * 원본 포인트(행) 수.
276
+ *
277
+ * Original point (row) count.
278
+ *
279
+ * 元のポイント(行)の数。
280
+ *
281
+ * 原始点(行)的数量。
282
+ */
92
283
  total: number;
93
- /** 원본 데이터가 LTTB 다운샘플링이나 카테고리 집계로 축약됐는가. true 면 화면에 그려진 값이
284
+ /**
285
+ * 원본 데이터가 LTTB 다운샘플링이나 카테고리 집계로 축약됐는가. true 면 화면에 그려진 값이
94
286
  * 원본 그대로가 아니라는 뜻이므로, 이 값을 보고 UI에서 축약 사실을 배지로 고지해야 한다.
95
- * / Whether the original data was reduced via LTTB downsampling or category aggregation. When
96
- * true, what's drawn on screen isn't the raw data verbatim — the UI should surface a badge
97
- * using this flag so the reduction isn't hidden from the viewer. */
287
+ *
288
+ * Whether the original data was reduced via LTTB downsampling or category aggregation. When
289
+ * true, what's drawn on screen isn't the raw data verbatim, so the UI should read this flag
290
+ * and disclose the reduction with a badge.
291
+ *
292
+ * 元のデータが LTTB ダウンサンプリングやカテゴリー集計で縮約されたか。true なら画面に描かれた
293
+ * 値が元のままではないという意味なので、この値を見て UI で縮約の事実をバッジとして知らせる
294
+ * 必要があります。
295
+ *
296
+ * 原始数据是否经 LTTB 降采样或类别聚合而缩减。为 true 时,表示画面上绘制的值并非原始数据
297
+ * 本身,因此应根据该值在 UI 中以徽章告知缩减的事实。
298
+ */
98
299
  sampled: boolean;
99
- /** 다운샘플링 전 포인트 수. / Point count before downsampling. */
300
+ /**
301
+ * 다운샘플링 전 포인트 수.
302
+ *
303
+ * Point count before downsampling.
304
+ *
305
+ * ダウンサンプリング前のポイント数。
306
+ *
307
+ * 降采样前的点数。
308
+ */
100
309
  sampledFrom?: number;
101
- /** 다운샘플링 후 포인트 수. / Point count after downsampling. */
310
+ /**
311
+ * 다운샘플링 후 포인트 수.
312
+ *
313
+ * Point count after downsampling.
314
+ *
315
+ * ダウンサンプリング後のポイント数。
316
+ *
317
+ * 降采样后的点数。
318
+ */
102
319
  sampledTo?: number;
103
- /** 적용된 집계 연산. / Applied aggregation op. */
320
+ /**
321
+ * 적용된 집계 연산.
322
+ *
323
+ * Applied aggregation op.
324
+ *
325
+ * 適用された集計演算。
326
+ *
327
+ * 已应用的聚合运算。
328
+ */
104
329
  aggregatedOp?: 'sum' | 'avg' | 'count' | 'min' | 'max' | 'custom';
105
- /** pie 에서 첫 시리즈만 사용됐는가. / Whether pie used only the first series. */
330
+ /**
331
+ * pie 에서 첫 시리즈만 사용됐는가.
332
+ *
333
+ * Whether pie used only the first series.
334
+ *
335
+ * pie で最初のシリーズだけが使われたか。
336
+ *
337
+ * pie 是否只使用了第一个系列。
338
+ */
106
339
  pieReducedToFirst?: boolean;
107
- /** pie 에서 음수를 절댓값 처리했는가. / Whether pie used absolute values for negatives. */
340
+ /**
341
+ * pie 에서 음수를 절댓값 처리했는가.
342
+ *
343
+ * Whether pie used absolute values for negatives.
344
+ *
345
+ * pie で負の数を絶対値として扱ったか。
346
+ *
347
+ * pie 是否把负数按绝对值处理。
348
+ */
108
349
  negativesAbsInPie?: boolean;
109
- /** 스크린리더 사용자를 위한 표 형태의 텍스트 등가물. 어떤 렌더 엔진(내장 canvas·외부 lib)을
350
+ /**
351
+ * 스크린리더 사용자를 위한 표 형태의 텍스트 등가물. 어떤 렌더 엔진(내장 canvas·외부 lib)을
110
352
  * 쓰든 추출(extractor) 단계에서 항상 채워지므로, 렌더러가 접근성을 신경 쓰지 않아도 이 값은
111
- * 항상 존재한다. / A table-shaped text alternative for screen-reader users. It's always filled
353
+ * 항상 존재한다.
354
+ *
355
+ * A table-shaped text alternative for screen-reader users. It's always filled
112
356
  * during extraction regardless of which render engine (built-in canvas or an external lib) is
113
- * used, so it's guaranteed to exist even if the renderer itself doesn't handle accessibility. */
357
+ * used, so it's guaranteed to exist even if the renderer itself doesn't handle accessibility.
358
+ *
359
+ * スクリーンリーダー利用者のための表形式のテキスト等価物。どのレンダーエンジン(内蔵 canvas・
360
+ * 外部 lib)を使っても抽出(extractor)の段階で必ず埋められるので、レンダラーがアクセシビリティ
361
+ * に気を配らなくてもこの値は常に存在します。
362
+ *
363
+ * 面向屏幕阅读器用户的表格形式文本等价物。无论使用哪种渲染引擎(内置 canvas、外部 lib),
364
+ * 抽取(extractor)阶段总会填充该值,因此即使渲染器不关心无障碍,它也始终存在。
365
+ */
114
366
  a11yTable: A11yTableModel;
115
367
  }
116
- /** 헤드리스 차트 데이터 모델(추출 산출물). / Headless chart data model (extraction output). */
368
+ /**
369
+ * 헤드리스 차트 데이터 모델(추출 산출물).
370
+ *
371
+ * Headless chart data model (extraction output).
372
+ *
373
+ * ヘッドレスなチャートデータモデル(抽出の成果物)。
374
+ *
375
+ * 无头图表数据模型(抽取的产物)。
376
+ */
117
377
  export interface ChartDataModel {
118
- /** 카테고리(x축) 라벨. / Category (x-axis) labels. */
378
+ /**
379
+ * 카테고리(x축) 라벨.
380
+ *
381
+ * Category (x-axis) labels.
382
+ *
383
+ * カテゴリー(x軸)のラベル。
384
+ *
385
+ * 类别(x轴)的标签。
386
+ */
119
387
  categories: string[];
120
- /** 시리즈 배열. / Series array. */
388
+ /**
389
+ * 시리즈 배열.
390
+ *
391
+ * Series array.
392
+ *
393
+ * シリーズの配列。
394
+ *
395
+ * 系列的数组。
396
+ */
121
397
  series: ChartSeries[];
122
- /** 모델 메타. / Model meta. */
398
+ /**
399
+ * 모델 메타.
400
+ *
401
+ * Model meta.
402
+ *
403
+ * モデルのメタ。
404
+ *
405
+ * 模型的元信息。
406
+ */
123
407
  meta: ChartDataModelMeta;
124
408
  }
125
- /** 차트 테마(색·글꼴·팔레트). / Chart theme (colors, fonts, palette). */
409
+ /**
410
+ * 차트 테마(색·글꼴·팔레트).
411
+ *
412
+ * Chart theme (colors, fonts, palette).
413
+ *
414
+ * チャートのテーマ(色・フォント・パレット)。
415
+ *
416
+ * 图表主题(颜色、字体、调色板)。
417
+ */
126
418
  export interface ChartTheme {
127
- /** 주 색. / Primary color. */
419
+ /**
420
+ * 주 색.
421
+ *
422
+ * Primary color.
423
+ *
424
+ * 主要な色。
425
+ *
426
+ * 主色。
427
+ */
128
428
  primary: string;
129
- /** 축·테두리 색. / Axis/border color. */
429
+ /**
430
+ * 축·테두리 색.
431
+ *
432
+ * Axis/border color.
433
+ *
434
+ * 軸・枠線の色。
435
+ *
436
+ * 轴/边框的颜色。
437
+ */
130
438
  border: string;
131
- /** 텍스트 색. / Text color. */
439
+ /**
440
+ * 텍스트 색.
441
+ *
442
+ * Text color.
443
+ *
444
+ * テキストの色。
445
+ *
446
+ * 文本的颜色。
447
+ */
132
448
  text: string;
133
- /** 배경 색. / Background color. */
449
+ /**
450
+ * 배경 색.
451
+ *
452
+ * Background color.
453
+ *
454
+ * 背景の色。
455
+ *
456
+ * 背景的颜色。
457
+ */
134
458
  bg: string;
135
- /** 그리드 선 색. / Grid line color. */
459
+ /**
460
+ * 그리드 선 색.
461
+ *
462
+ * Grid line color.
463
+ *
464
+ * グリッド線の色。
465
+ *
466
+ * 网格线的颜色。
467
+ */
136
468
  gridLine: string;
137
- /** 글꼴 패밀리. / Font family. */
469
+ /**
470
+ * 글꼴 패밀리.
471
+ *
472
+ * Font family.
473
+ *
474
+ * フォントファミリー。
475
+ *
476
+ * 字体族。
477
+ */
138
478
  fontFamily: string;
139
- /** 기본 글꼴 크기(px). / Base font size in px. */
479
+ /**
480
+ * 기본 글꼴 크기(px).
481
+ *
482
+ * Base font size in px.
483
+ *
484
+ * 基本のフォントサイズ(px)。
485
+ *
486
+ * 基础字号(px)。
487
+ */
140
488
  fontSize: number;
141
- /** 시리즈 순환 팔레트. / Series-cycling palette. */
489
+ /**
490
+ * 시리즈 순환 팔레트.
491
+ *
492
+ * Series-cycling palette.
493
+ *
494
+ * シリーズを循環させるパレット。
495
+ *
496
+ * 供系列循环使用的调色板。
497
+ */
142
498
  palette: string[];
143
499
  }
144
- /** 렌더 스펙(어댑터에 전달되는 스냅샷). / Render spec (snapshot passed to adapters). */
500
+ /**
501
+ * 렌더 스펙(어댑터에 전달되는 스냅샷).
502
+ *
503
+ * Render spec (snapshot passed to adapters).
504
+ *
505
+ * レンダー仕様(アダプターに渡されるスナップショット)。
506
+ *
507
+ * 渲染规格(传给适配器的快照)。
508
+ */
145
509
  export interface ChartRenderSpec {
146
- /** 차트 타입. / Chart type. */
510
+ /**
511
+ * 차트 타입.
512
+ *
513
+ * Chart type.
514
+ *
515
+ * チャートのタイプ。
516
+ *
517
+ * 图表的类型。
518
+ */
147
519
  type: ChartType;
148
- /** 차트 제목. / Chart title. */
520
+ /**
521
+ * 차트 제목.
522
+ *
523
+ * Chart title.
524
+ *
525
+ * チャートのタイトル。
526
+ *
527
+ * 图表的标题。
528
+ */
149
529
  title?: string;
150
- /** 범례 표시/위치. / Legend visibility/position. */
530
+ /**
531
+ * 범례 표시/위치.
532
+ *
533
+ * Legend visibility/position.
534
+ *
535
+ * 凡例の表示/位置。
536
+ *
537
+ * 图例的显示/位置。
538
+ */
151
539
  legend?: boolean | {
152
540
  position: 'top' | 'bottom' | 'left' | 'right';
153
541
  };
154
- /** 툴팁 사용 여부. / Whether tooltips are enabled. */
542
+ /**
543
+ * 툴팁 사용 여부.
544
+ *
545
+ * Whether tooltips are enabled.
546
+ *
547
+ * ツールチップを使うかどうか。
548
+ *
549
+ * 是否启用提示框。
550
+ */
155
551
  tooltip?: boolean;
156
- /** 축 설정(라벨·min/max·스택). / Axis config (labels, min/max, stacked). */
552
+ /**
553
+ * 축 설정(라벨·min/max·스택).
554
+ *
555
+ * Axis config (labels, min/max, stacked).
556
+ *
557
+ * 軸の設定(ラベル・min/max・スタック)。
558
+ *
559
+ * 轴的配置(标签、min/max、堆叠)。
560
+ */
157
561
  axis?: {
158
562
  xLabel?: string;
159
563
  yLabel?: string;
@@ -161,142 +565,477 @@ export interface ChartRenderSpec {
161
565
  yMax?: number;
162
566
  stacked?: boolean;
163
567
  };
164
- /** 시리즈 팔레트(테마 팔레트 오버라이드). / Series palette (overrides theme palette). */
568
+ /**
569
+ * 시리즈 팔레트(테마 팔레트 오버라이드).
570
+ *
571
+ * Series palette (overrides theme palette).
572
+ *
573
+ * シリーズのパレット(テーマのパレットを上書き)。
574
+ *
575
+ * 系列的调色板(覆盖主题的调色板)。
576
+ */
165
577
  palette?: string[];
166
- /** 렌더 테마. / Render theme. */
578
+ /**
579
+ * 렌더 테마.
580
+ *
581
+ * Render theme.
582
+ *
583
+ * レンダーのテーマ。
584
+ *
585
+ * 渲染的主题。
586
+ */
167
587
  theme: ChartTheme;
168
- /** 숫자 포맷터(축/툴팁/범례 컨텍스트). / Number formatter (axis/tooltip/legend context). */
588
+ /**
589
+ * 숫자 포맷터(축/툴팁/범례 컨텍스트).
590
+ *
591
+ * Number formatter (axis/tooltip/legend context).
592
+ *
593
+ * 数値のフォーマッター(軸/ツールチップ/凡例のコンテキスト)。
594
+ *
595
+ * 数值格式化函数(轴/提示框/图例的上下文)。
596
+ */
169
597
  numberFormat?: (v: number, ctx: {
170
598
  axis: 'x' | 'y' | 'tooltip' | 'legend';
171
599
  field?: string;
172
600
  }) => string;
173
- /** 접근성 테이블 모델. / Accessibility table model. */
601
+ /**
602
+ * 접근성 테이블 모델.
603
+ *
604
+ * Accessibility table model.
605
+ *
606
+ * アクセシビリティのテーブルモデル。
607
+ *
608
+ * 无障碍表格模型。
609
+ */
174
610
  a11y: A11yTableModel;
175
611
  }
176
- /** 차트 포인트(히트테스트/클릭 대상). / Chart point (hit-test/click target). */
612
+ /**
613
+ * 차트 포인트(히트테스트/클릭 대상).
614
+ *
615
+ * Chart point (hit-test/click target).
616
+ *
617
+ * チャートのポイント(ヒットテスト/クリックの対象)。
618
+ *
619
+ * 图表的点(命中测试/点击的目标)。
620
+ */
177
621
  export interface ChartPoint {
178
- /** 시리즈 이름. / Series name. */
622
+ /**
623
+ * 시리즈 이름.
624
+ *
625
+ * Series name.
626
+ *
627
+ * シリーズの名前。
628
+ *
629
+ * 系列的名称。
630
+ */
179
631
  seriesName: string;
180
- /** 카테고리 라벨. / Category label. */
632
+ /**
633
+ * 카테고리 라벨.
634
+ *
635
+ * Category label.
636
+ *
637
+ * カテゴリーのラベル。
638
+ *
639
+ * 类别的标签。
640
+ */
181
641
  category: string;
182
- /** 값(결측 null). / Value (null if missing). */
642
+ /**
643
+ * 값(결측 null).
644
+ *
645
+ * Value (null if missing).
646
+ *
647
+ * 値(欠測は null)。
648
+ *
649
+ * 值(缺失为 null)。
650
+ */
183
651
  value: number | null;
184
- /** 카테고리 인덱스. / Category index. */
652
+ /**
653
+ * 카테고리 인덱스.
654
+ *
655
+ * Category index.
656
+ *
657
+ * カテゴリーのインデックス。
658
+ *
659
+ * 类别的索引。
660
+ */
185
661
  index: number;
186
- /** 원본 행 stable id(있으면). / Source row stable id (if any). */
662
+ /**
663
+ * 원본 행 stable id(있으면).
664
+ *
665
+ * Source row stable id (if any).
666
+ *
667
+ * 元の行の stable id(あれば)。
668
+ *
669
+ * 源行的 stable id(如果有)。
670
+ */
187
671
  rowId?: string;
188
672
  }
189
673
  /**
190
674
  * 차트 렌더 어댑터(교체 seam) — 내장 canvas 렌더러와 외부 차트 라이브러리(ECharts 등) 백엔드를
191
675
  * 하나의 공통 인터페이스로 감싼다. 내장 렌더러로는 부족해서 다른 차트 라이브러리로 실제 그리는
192
676
  * 부분만 바꿔치기하고 싶을 때, 이 인터페이스를 구현해 `ChartConfig.engine`에 넘긴다.
193
- * / Chart render adapter (swap seam) — wraps the built-in canvas renderer and external chart
677
+ *
678
+ * Chart render adapter (swap seam) — wraps the built-in canvas renderer and external chart
194
679
  * library backends (e.g. ECharts) behind one common interface. Implement this when the built-in
195
680
  * renderer isn't enough and you want to swap in a different charting library for the actual
196
681
  * drawing, then pass it via `ChartConfig.engine`.
197
682
  *
683
+ * チャートのレンダーアダプター(差し替えの seam) — 内蔵 canvas レンダラーと外部チャート
684
+ * ライブラリ(ECharts など)のバックエンドを、一つの共通インターフェースで包みます。内蔵
685
+ * レンダラーでは足りず、別のチャートライブラリで実際に描く部分だけを差し替えたいときに、この
686
+ * インターフェースを実装して `ChartConfig.engine` に渡します。
687
+ *
688
+ * 图表渲染适配器(替换用的 seam) — 用一个共同的接口包裹内置 canvas 渲染器和外部图表库
689
+ * (如 ECharts)后端。当内置渲染器不够用、只想把实际绘制的部分换成别的图表库时,实现该接口
690
+ * 并传给 `ChartConfig.engine`。
691
+ *
198
692
  * @example
199
693
  * const myAdapter: ChartAdapter = {
200
694
  * id: 'my-echarts-adapter',
201
- * // 차트 라이브러리 인스턴스 생성 / create the chart-lib instance
695
+ * // create the chart-lib instance
202
696
  * async init(host, spec) { echartsInstance = echarts.init(host); },
203
- * // model.categories/series 를 라이브러리 포맷으로 변환해 그리기 / map the model into the lib's format and draw
697
+ * // map the model into the lib's format and draw
204
698
  * render(model, spec) { echartsInstance.setOption(toEchartsOption(model, spec)); },
205
- * // 라이브러리 resize 호출 / call the lib's resize
699
+ * // call the lib's resize
206
700
  * resize(w, h) { echartsInstance.resize({ width: w, height: h }); },
207
- * // 라이브러리 인스턴스 정리 / tear down the lib instance
701
+ * // tear down the lib instance
208
702
  * destroy() { echartsInstance.dispose(); },
209
703
  * };
210
704
  */
211
705
  export interface ChartAdapter {
212
- /** 어댑터 식별자. / Adapter identifier. */
706
+ /**
707
+ * 어댑터 식별자.
708
+ *
709
+ * Adapter identifier.
710
+ *
711
+ * アダプターの識別子。
712
+ *
713
+ * 适配器的标识符。
714
+ */
213
715
  readonly id: string;
214
- /** 호스트에 초기화. / Initialize into the host. */
716
+ /**
717
+ * 호스트에 초기화.
718
+ *
719
+ * Initialize into the host.
720
+ *
721
+ * ホストへ初期化。
722
+ *
723
+ * 在宿主元素中初始化。
724
+ */
215
725
  init(host: HTMLElement, spec: ChartRenderSpec): Promise<void>;
216
- /** 모델을 렌더. / Render the model. */
726
+ /**
727
+ * 모델을 렌더.
728
+ *
729
+ * Render the model.
730
+ *
731
+ * モデルをレンダー。
732
+ *
733
+ * 渲染模型。
734
+ */
217
735
  render(model: ChartDataModel, spec: ChartRenderSpec): void;
218
- /** 렌더 영역 크기 변경. / Resize the render area. */
736
+ /**
737
+ * 렌더 영역 크기 변경.
738
+ *
739
+ * Resize the render area.
740
+ *
741
+ * レンダー領域のサイズ変更。
742
+ *
743
+ * 调整渲染区域的大小。
744
+ */
219
745
  resize(width: number, height: number): void;
220
- /** 현재 렌더를 이미지 Blob 으로(선택). / Export current render as an image Blob (optional). */
746
+ /**
747
+ * 현재 렌더를 이미지 Blob 으로(선택).
748
+ *
749
+ * Export current render as an image Blob (optional).
750
+ *
751
+ * 現在のレンダーを画像 Blob として(任意)。
752
+ *
753
+ * 把当前渲染结果导出为图片 Blob(可选)。
754
+ */
221
755
  toBlob?(mime?: string): Promise<Blob | null>;
222
- /** 포인트 클릭 콜백 등록(선택). / Register a point-click callback (optional). */
756
+ /**
757
+ * 포인트 클릭 콜백 등록(선택).
758
+ *
759
+ * Register a point-click callback (optional).
760
+ *
761
+ * ポイントクリックのコールバック登録(任意)。
762
+ *
763
+ * 注册点位点击的回调(可选)。
764
+ */
223
765
  onPointClick?(cb: (p: ChartPoint) => void): void;
224
- /** 어댑터 정리. / Tear down the adapter. */
766
+ /**
767
+ * 어댑터 정리.
768
+ *
769
+ * Tear down the adapter.
770
+ *
771
+ * アダプターの後始末。
772
+ *
773
+ * 清理适配器。
774
+ */
225
775
  destroy(): void;
226
776
  }
227
- /** `grid.createChart()`가 반환하는, 살아있는 차트를 다루는 핸들. 실제 구현체는 ChartManager.
777
+ /**
778
+ * `grid.createChart()`가 반환하는, 살아있는 차트를 다루는 핸들. 실제 구현체는 ChartManager.
228
779
  * 이 핸들로 타입 전환·갱신·이미지 추출·파기까지 차트의 생애주기 전체를 조작한다.
229
- * / The handle returned by `grid.createChart()` for controlling a live chart; implemented by
780
+ *
781
+ * The handle returned by `grid.createChart()` for controlling a live chart; implemented by
230
782
  * ChartManager. Use it to change type, refresh, export an image, and destroy — the chart's
231
- * whole lifecycle. */
783
+ * whole lifecycle.
784
+ *
785
+ * `grid.createChart()` が返す、生きているチャートを扱うハンドル。実際の実装は ChartManager。
786
+ * このハンドルでタイプの切り替え・更新・画像の取り出し・破棄まで、チャートのライフサイクル
787
+ * 全体を操作します。
788
+ *
789
+ * `grid.createChart()` 返回的句柄,用于操作活动中的图表;实际实现是 ChartManager。用它切换类型、
790
+ * 更新、导出图片、销毁 — 操作图表的整个生命周期。
791
+ */
232
792
  export interface ChartInstance {
233
- /** 차트 인스턴스 id. / Chart instance id. */
793
+ /**
794
+ * 차트 인스턴스 id.
795
+ *
796
+ * Chart instance id.
797
+ *
798
+ * チャートインスタンスの id。
799
+ *
800
+ * 图表实例的 id。
801
+ */
234
802
  readonly id: string;
235
- /** 설정 패치 후 갱신. / Patch config and update. */
803
+ /**
804
+ * 설정 패치 후 갱신.
805
+ *
806
+ * Patch config and update.
807
+ *
808
+ * 設定をパッチしてから更新。
809
+ *
810
+ * 修补配置后更新。
811
+ */
236
812
  update(patch?: Partial<ChartConfig>): void;
237
813
  /**
238
814
  * 모델을 재추출하고 렌더 스펙(테마 포함)을 다시 계산해 재렌더한다.
239
- * / Re-extract the model and recompute the render spec (incl. theme), then re-render.
815
+ *
816
+ * Re-extract the model and recompute the render spec (incl. theme), then re-render.
817
+ *
818
+ * モデルを再抽出し、レンダー仕様(テーマを含む)を計算し直して再レンダーします。
819
+ *
820
+ * 重新抽取模型,重新计算渲染规格(含主题),然后重新渲染。
240
821
  *
241
822
  * 그리드는 테마가 바뀌어도 별도 이벤트를 발행하지 않는다(`setTheme`/`setThemeVar`는 CSS만
242
823
  * 갱신). 그래서 다크모드 토글처럼 데이터는 그대로고 테마만 바뀐 경우, 열려 있는 각 차트에
243
824
  * 대해 이 메서드를 직접 호출해야 새 테마(색·글꼴·팔레트)가 반영된다. `update()`/`setType()`도
244
825
  * 내부적으로 이 경로를 그대로 탄다.
245
- * / The grid doesn't emit a dedicated event when only the theme changes (`setTheme`/
826
+ *
827
+ * The grid doesn't emit a dedicated event when only the theme changes (`setTheme`/
246
828
  * `setThemeVar` update CSS only). So after a pure theme switch with no data change — e.g. a
247
829
  * dark-mode toggle — call this on each open chart to apply the new theme (colors, fonts,
248
830
  * palette). `update()` and `setType()` internally follow the same path.
831
+ *
832
+ * グリッドはテーマが変わっても別途イベントを発行しません(`setTheme`/`setThemeVar` は CSS
833
+ * だけを更新)。そのため、ダークモードの切り替えのようにデータはそのままでテーマだけが
834
+ * 変わった場合は、開いている各チャートに対してこのメソッドを直接呼ばないと新しいテーマ
835
+ * (色・フォント・パレット)が反映されません。`update()`/`setType()` も内部的にこの経路を
836
+ * そのまま通ります。
837
+ *
838
+ * 主题变化时表格不会发出专门的事件(`setTheme`/`setThemeVar` 只更新 CSS)。因此,像切换暗色
839
+ * 模式那样数据不变、只有主题变化的情况下,必须对每个已打开的图表直接调用该方法,新主题
840
+ * (颜色、字体、调色板)才会生效。`update()`/`setType()` 内部也走同一条路径。
249
841
  */
250
842
  refresh(): void;
251
- /** 차트 타입 변경. / Change the chart type. */
843
+ /**
844
+ * 차트 타입 변경.
845
+ *
846
+ * Change the chart type.
847
+ *
848
+ * チャートタイプの変更。
849
+ *
850
+ * 变更图表的类型。
851
+ */
252
852
  setType(type: ChartType): void;
253
- /** 차트 인스턴스 파기. / Destroy the chart instance. */
853
+ /**
854
+ * 차트 인스턴스 파기.
855
+ *
856
+ * Destroy the chart instance.
857
+ *
858
+ * チャートインスタンスの破棄。
859
+ *
860
+ * 销毁图表实例。
861
+ */
254
862
  destroy(): void;
255
- /** 현재 렌더를 이미지 Blob 으로. / Export current render as an image Blob. */
863
+ /**
864
+ * 현재 렌더를 이미지 Blob 으로.
865
+ *
866
+ * Export current render as an image Blob.
867
+ *
868
+ * 現在のレンダーを画像 Blob として。
869
+ *
870
+ * 把当前渲染结果导出为图片 Blob。
871
+ */
256
872
  toBlob(mime?: string): Promise<Blob | null>;
257
- /** 현재 데이터 모델 반환. / Return the current data model. */
873
+ /**
874
+ * 현재 데이터 모델 반환.
875
+ *
876
+ * Return the current data model.
877
+ *
878
+ * 現在のデータモデルを返します。
879
+ *
880
+ * 返回当前的数据模型。
881
+ */
258
882
  getModel(): ChartDataModel;
259
- /** 차트 이벤트 리스너 등록. / Register a chart event listener. */
883
+ /**
884
+ * 차트 이벤트 리스너 등록.
885
+ *
886
+ * Register a chart event listener.
887
+ *
888
+ * チャートイベントのリスナー登録。
889
+ *
890
+ * 注册图表事件的监听器。
891
+ */
260
892
  on(ev: 'chartRender' | 'chartPointClick', cb: (...a: any[]) => void): void;
261
893
  }
262
- /** `GridOptions.chart`에 중첩해서 넣는, 그리드 전체에 적용되는 차트 기본값. 그리드 인스턴스를
894
+ /**
895
+ * `GridOptions.chart`에 중첩해서 넣는, 그리드 전체에 적용되는 차트 기본값. 그리드 인스턴스를
263
896
  * 만들 때 한 번 설정해 두면 이후 `createChart()` 호출마다 반복하지 않아도 되는 공통값(기본
264
- * 엔진·팔레트·포인트 상한 등)이다. / Chart defaults applied grid-wide, nested under
897
+ * 엔진·팔레트·포인트 상한 등)이다.
898
+ *
899
+ * Chart defaults applied grid-wide, nested under
265
900
  * `GridOptions.chart`. Set once when constructing the grid, and every later `createChart()` call
266
- * inherits the shared defaults (default engine, palette, point cap, etc.) without repeating them. */
901
+ * inherits the shared defaults (default engine, palette, point cap, etc.) without repeating them.
902
+ *
903
+ * `GridOptions.chart` に入れ子にして入れる、グリッド全体に適用されるチャートの既定値。グリッド
904
+ * インスタンスを作るときに一度設定しておけば、以後の `createChart()` の呼び出しごとに繰り返さ
905
+ * なくてよい共通の値(既定のエンジン・パレット・ポイント上限など)です。
906
+ *
907
+ * 嵌套在 `GridOptions.chart` 下、作用于整个表格的图表默认值。构建表格实例时设置一次,之后每次
908
+ * 调用 `createChart()` 都无需重复填写这些共同的值(默认引擎、调色板、点数上限等)。
909
+ */
267
910
  export interface ChartGlobalOptions {
268
- /** 차트 기능 활성화. / Enable the chart feature. */
911
+ /**
912
+ * 차트 기능 활성화.
913
+ *
914
+ * Enable the chart feature.
915
+ *
916
+ * チャート機能の有効化。
917
+ *
918
+ * 启用图表功能。
919
+ */
269
920
  enabled?: boolean;
270
- /** 기본 렌더 엔진. / Default render engine. */
921
+ /**
922
+ * 기본 렌더 엔진.
923
+ *
924
+ * Default render engine.
925
+ *
926
+ * 既定のレンダーエンジン。
927
+ *
928
+ * 默认的渲染引擎。
929
+ */
271
930
  defaultEngine?: 'builtin' | 'chartjs' | 'echarts';
272
- /** 기본 차트 타입. / Default chart type. */
931
+ /**
932
+ * 기본 차트 타입.
933
+ *
934
+ * Default chart type.
935
+ *
936
+ * 既定のチャートタイプ。
937
+ *
938
+ * 默认的图表类型。
939
+ */
273
940
  defaultType?: ChartType;
274
- /** 기본 배치 방식. / Default placement. */
941
+ /**
942
+ * 기본 배치 방식.
943
+ *
944
+ * Default placement.
945
+ *
946
+ * 既定の配置方法。
947
+ *
948
+ * 默认的放置方式。
949
+ */
275
950
  placement?: 'docked' | 'modal' | 'inline' | 'floating';
276
- /** 렌더 포인트 상한(초과 시 다운샘플링). / Max render points (downsample above this). */
951
+ /**
952
+ * 렌더 포인트 상한(초과 시 다운샘플링).
953
+ *
954
+ * Max render points (downsample above this).
955
+ *
956
+ * レンダーするポイントの上限(超えたらダウンサンプリング)。
957
+ *
958
+ * 渲染点数的上限(超出则降采样)。
959
+ */
277
960
  maxPoints?: number;
278
- /** live 갱신 디바운스(ms). / Debounce for live updates (ms). */
961
+ /**
962
+ * live 갱신 디바운스(ms).
963
+ *
964
+ * Debounce for live updates (ms).
965
+ *
966
+ * live 更新のデバウンス(ms)。
967
+ *
968
+ * live 更新的防抖(ms)。
969
+ */
279
970
  debounceMs?: number;
280
- /** 기본 팔레트. / Default palette. */
971
+ /**
972
+ * 기본 팔레트.
973
+ *
974
+ * Default palette.
975
+ *
976
+ * 既定のパレット。
977
+ *
978
+ * 默认的调色板。
979
+ */
281
980
  palette?: string[];
282
- /** 기본 숫자 포맷터. / Default number formatter. */
981
+ /**
982
+ * 기본 숫자 포맷터.
983
+ *
984
+ * Default number formatter.
985
+ *
986
+ * 既定の数値フォーマッター。
987
+ *
988
+ * 默认的数值格式化函数。
989
+ */
283
990
  numberFormat?: (v: number, ctx: {
284
991
  axis: 'x' | 'y' | 'tooltip' | 'legend';
285
992
  field?: string;
286
993
  }) => string;
287
- /** 차트 생성 콜백. / Chart-create callback. */
994
+ /**
995
+ * 차트 생성 콜백.
996
+ *
997
+ * Chart-create callback.
998
+ *
999
+ * チャート生成のコールバック。
1000
+ *
1001
+ * 图表创建的回调。
1002
+ */
288
1003
  onChartCreate?: (i: ChartInstance) => void;
289
- /** 차트 렌더 콜백. / Chart-render callback. */
1004
+ /**
1005
+ * 차트 렌더 콜백.
1006
+ *
1007
+ * Chart-render callback.
1008
+ *
1009
+ * チャートレンダーのコールバック。
1010
+ *
1011
+ * 图表渲染的回调。
1012
+ */
290
1013
  onChartRender?: (e: {
291
1014
  id: string;
292
1015
  model: ChartDataModel;
293
1016
  }) => void;
294
- /** 포인트 클릭 콜백. / Point-click callback. */
1017
+ /**
1018
+ * 포인트 클릭 콜백.
1019
+ *
1020
+ * Point-click callback.
1021
+ *
1022
+ * ポイントクリックのコールバック。
1023
+ *
1024
+ * 点位点击的回调。
1025
+ */
295
1026
  onChartPointClick?: (e: {
296
1027
  id: string;
297
1028
  point: ChartPoint;
298
1029
  }) => void;
299
- /** 차트 파기 콜백. / Chart-destroy callback. */
1030
+ /**
1031
+ * 차트 파기 콜백.
1032
+ *
1033
+ * Chart-destroy callback.
1034
+ *
1035
+ * チャート破棄のコールバック。
1036
+ *
1037
+ * 图表销毁的回调。
1038
+ */
300
1039
  onChartDestroy?: (e: {
301
1040
  id: string;
302
1041
  }) => void;
@@ -304,10 +1043,17 @@ export interface ChartGlobalOptions {
304
1043
  /**
305
1044
  * `grid.createChart(config)`에 넘기는 공개 설정. 어떤 데이터를(source) 어떤 모양으로(type)
306
1045
  * 그릴지가 필수고, 나머지는 배치·엔진·꾸밈(제목/범례/축 등)을 위한 선택 옵션이다.
307
- * / The public config passed to `grid.createChart(config)`. Only which data (source) and what
1046
+ *
1047
+ * The public config passed to `grid.createChart(config)`. Only which data (source) and what
308
1048
  * shape (type) to draw are required; the rest are optional placement/engine/decoration
309
1049
  * (title, legend, axis, etc.) settings.
310
1050
  *
1051
+ * `grid.createChart(config)` に渡す公開設定。どのデータを(source)どの形で(type)描くかが必須で、
1052
+ * 残りは配置・エンジン・装飾(タイトル/凡例/軸など)のための任意オプションです。
1053
+ *
1054
+ * 传给 `grid.createChart(config)` 的公开配置。绘制哪些数据(source)、绘制成什么形态(type)是
1055
+ * 必填项;其余是用于放置、引擎、装饰(标题/图例/轴等)的可选项。
1056
+ *
311
1057
  * @example
312
1058
  * const chart = grid.createChart({
313
1059
  * source: { kind: 'all' },
@@ -319,39 +1065,175 @@ export interface ChartGlobalOptions {
319
1065
  * });
320
1066
  */
321
1067
  export interface ChartConfig {
322
- /** 데이터 소스. / Data source. */
1068
+ /**
1069
+ * 데이터 소스.
1070
+ *
1071
+ * Data source.
1072
+ *
1073
+ * データソース。
1074
+ *
1075
+ * 数据源。
1076
+ */
323
1077
  source: ChartSource;
324
- /** 차트 타입. / Chart type. */
1078
+ /**
1079
+ * 차트 타입.
1080
+ *
1081
+ * Chart type.
1082
+ *
1083
+ * チャートのタイプ。
1084
+ *
1085
+ * 图表的类型。
1086
+ */
325
1087
  type: ChartType;
326
- /** 렌더 엔진 또는 커스텀 어댑터. / Render engine or custom adapter. */
1088
+ /**
1089
+ * 렌더 엔진 또는 커스텀 어댑터.
1090
+ *
1091
+ * Render engine or custom adapter.
1092
+ *
1093
+ * レンダーエンジン、またはカスタムアダプター。
1094
+ *
1095
+ * 渲染引擎,或自定义适配器。
1096
+ */
327
1097
  engine?: 'builtin' | 'chartjs' | 'echarts' | ChartAdapter;
328
- /** 배치 방식. / Placement. */
1098
+ /**
1099
+ * 배치 방식.
1100
+ *
1101
+ * Placement.
1102
+ *
1103
+ * 配置方法。
1104
+ *
1105
+ * 放置方式。
1106
+ */
329
1107
  placement?: 'docked' | 'modal' | 'inline' | 'floating';
330
- /** inline/floating 시 마운트 대상. / Mount target for inline/floating. */
1108
+ /**
1109
+ * inline/floating 시 마운트 대상.
1110
+ *
1111
+ * Mount target for inline/floating.
1112
+ *
1113
+ * inline/floating のときのマウント先。
1114
+ *
1115
+ * inline/floating 时的挂载目标。
1116
+ */
331
1117
  mount?: HTMLElement;
332
- /** 카테고리(x축) 컬럼 field. / Category (x-axis) column field. */
1118
+ /**
1119
+ * 카테고리(x축) 컬럼 field.
1120
+ *
1121
+ * Category (x-axis) column field.
1122
+ *
1123
+ * カテゴリー(x軸)の列の field。
1124
+ *
1125
+ * 类别(x轴)列的 field。
1126
+ */
333
1127
  category?: string;
334
- /** 시리즈 명세 목록. / Series specs. */
1128
+ /**
1129
+ * 시리즈 명세 목록.
1130
+ *
1131
+ * Series specs.
1132
+ *
1133
+ * シリーズ仕様の一覧。
1134
+ *
1135
+ * 系列规格的列表。
1136
+ */
335
1137
  series?: Array<string | ChartSeriesSpec>;
336
- /** 카테고리 집계 연산. / Category aggregation op. */
1138
+ /**
1139
+ * 카테고리 집계 연산.
1140
+ *
1141
+ * Category aggregation op.
1142
+ *
1143
+ * カテゴリーの集計演算。
1144
+ *
1145
+ * 类别的聚合运算。
1146
+ */
337
1147
  aggregate?: ChartAggregate;
338
- /** 렌더 포인트 상한. / Max render points. */
1148
+ /**
1149
+ * 렌더 포인트 상한.
1150
+ *
1151
+ * Max render points.
1152
+ *
1153
+ * レンダーするポイントの上限。
1154
+ *
1155
+ * 渲染点数的上限。
1156
+ */
339
1157
  maxPoints?: number;
340
- /** 데이터 변경 시 자동 갱신. / Auto-refresh on data changes. */
1158
+ /**
1159
+ * 데이터 변경 시 자동 갱신.
1160
+ *
1161
+ * Auto-refresh on data changes.
1162
+ *
1163
+ * データ変更時の自動更新。
1164
+ *
1165
+ * 数据变化时自动更新。
1166
+ */
341
1167
  live?: boolean;
342
- /** 차트 제목. / Chart title. */
1168
+ /**
1169
+ * 차트 제목.
1170
+ *
1171
+ * Chart title.
1172
+ *
1173
+ * チャートのタイトル。
1174
+ *
1175
+ * 图表的标题。
1176
+ */
343
1177
  title?: string;
344
- /** 범례 설정. / Legend config. */
1178
+ /**
1179
+ * 범례 설정.
1180
+ *
1181
+ * Legend config.
1182
+ *
1183
+ * 凡例の設定。
1184
+ *
1185
+ * 图例的配置。
1186
+ */
345
1187
  legend?: ChartRenderSpec['legend'];
346
- /** 툴팁 사용 여부. / Whether tooltips are enabled. */
1188
+ /**
1189
+ * 툴팁 사용 여부.
1190
+ *
1191
+ * Whether tooltips are enabled.
1192
+ *
1193
+ * ツールチップを使うかどうか。
1194
+ *
1195
+ * 是否启用提示框。
1196
+ */
347
1197
  tooltip?: boolean;
348
- /** 축 설정. / Axis config. */
1198
+ /**
1199
+ * 축 설정.
1200
+ *
1201
+ * Axis config.
1202
+ *
1203
+ * 軸の設定。
1204
+ *
1205
+ * 轴的配置。
1206
+ */
349
1207
  axis?: ChartRenderSpec['axis'];
350
- /** 시리즈 팔레트. / Series palette. */
1208
+ /**
1209
+ * 시리즈 팔레트.
1210
+ *
1211
+ * Series palette.
1212
+ *
1213
+ * シリーズのパレット。
1214
+ *
1215
+ * 系列的调色板。
1216
+ */
351
1217
  palette?: string[];
352
- /** 숫자 포맷터. / Number formatter. */
1218
+ /**
1219
+ * 숫자 포맷터.
1220
+ *
1221
+ * Number formatter.
1222
+ *
1223
+ * 数値のフォーマッター。
1224
+ *
1225
+ * 数值的格式化函数。
1226
+ */
353
1227
  numberFormat?: ChartRenderSpec['numberFormat'];
354
- /** 렌더 크기(px). / Render size (px). */
1228
+ /**
1229
+ * 렌더 크기(px).
1230
+ *
1231
+ * Render size (px).
1232
+ *
1233
+ * レンダーのサイズ(px)。
1234
+ *
1235
+ * 渲染的尺寸(px)。
1236
+ */
355
1237
  size?: {
356
1238
  width: number;
357
1239
  height: number;