@worm-print-platform/echarts 1.5.3 → 1.6.1

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,11 +1,12 @@
1
1
  /*!
2
- * @worm-print-platform/echarts v1.5.3
2
+ * @worm-print-platform/echarts v1.6.1
3
3
  * Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
4
4
  * SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
5
5
  * SPDX-License-Identifier: MIT
6
6
  */
7
7
 
8
8
  // src/plugin.ts
9
+ import { t } from "@worm-print-platform/core/i18n";
9
10
  import {
10
11
  defineElementPlugin,
11
12
  getElementPluginById,
@@ -20,120 +21,143 @@ var CHART_KIND_DEFINITIONS = [
20
21
  {
21
22
  type: "barChart",
22
23
  label: "\u67F1\u72B6\u56FE",
24
+ labelKey: "echarts.series.typeNames.bar",
23
25
  icon: "ChartColumn",
24
26
  seriesType: "bar",
25
27
  orientation: "vertical",
26
- fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack"],
28
+ fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack", "label"],
27
29
  requiredOptionKeys: BASE_REQUIRED,
28
30
  defaultWidth: 100,
29
31
  defaultHeight: 60,
30
- notes: "\u67F1\u72B6\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF0C\u6BCF\u5B57\u6BB5\u4E00\u4E2A series\uFF1Bseries[].data \u5199 $data \u5360\u4F4D\uFF1B\u56FA\u5B9A\u9AD8\uFF0C\u7981\u6B62 autoHeight"
32
+ notes: "\u67F1\u72B6\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF0C\u6BCF\u5B57\u6BB5\u4E00\u4E2A series\uFF1Bseries[].data \u5199 $data \u5360\u4F4D\uFF1B\u56FA\u5B9A\u9AD8\uFF0C\u7981\u6B62 autoHeight",
33
+ notesKey: "echarts.notes.bar"
31
34
  },
32
35
  {
33
36
  type: "barHChart",
34
37
  label: "\u6761\u5F62\u56FE",
38
+ labelKey: "echarts.series.typeNames.barH",
35
39
  icon: "ChartBar",
36
40
  seriesType: "bar",
37
41
  orientation: "horizontal",
38
- fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack"],
42
+ fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack", "label"],
39
43
  requiredOptionKeys: BASE_REQUIRED,
40
44
  defaultWidth: 100,
41
45
  defaultHeight: 60,
42
- notes: "\u6A2A\u5411\u6761\u5F62\u56FE\uFF1AxAxis \u4E3A\u6570\u503C\u3001yAxis \u4E3A\u7C7B\u76EE\uFF1B\u7C7B\u76EE\u5199 yAxis.data \u7684 $data \u5360\u4F4D"
46
+ notes: "\u6A2A\u5411\u6761\u5F62\u56FE\uFF1AxAxis \u4E3A\u6570\u503C\u3001yAxis \u4E3A\u7C7B\u76EE\uFF1B\u7C7B\u76EE\u5199 yAxis.data \u7684 $data \u5360\u4F4D",
47
+ notesKey: "echarts.notes.barH"
43
48
  },
44
49
  {
45
50
  type: "lineChart",
46
51
  label: "\u6298\u7EBF\u56FE",
52
+ labelKey: "echarts.series.typeNames.line",
47
53
  icon: "ChartLine",
48
54
  seriesType: "line",
49
- fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack"],
55
+ fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack", "label"],
50
56
  requiredOptionKeys: BASE_REQUIRED,
51
57
  defaultWidth: 100,
52
58
  defaultHeight: 60,
53
- notes: "\u6298\u7EBF\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF1B\u4E0D\u5199 areaStyle"
59
+ notes: "\u6298\u7EBF\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF1B\u4E0D\u5199 areaStyle",
60
+ notesKey: "echarts.notes.line"
54
61
  },
55
62
  {
56
63
  type: "areaChart",
57
64
  label: "\u9762\u79EF\u56FE",
65
+ labelKey: "echarts.series.typeNames.area",
58
66
  icon: "ChartArea",
59
67
  seriesType: "line",
60
- fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack"],
68
+ fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack", "label"],
61
69
  requiredOptionKeys: BASE_REQUIRED,
62
70
  defaultWidth: 100,
63
71
  defaultHeight: 60,
64
- notes: "\u9762\u79EF\u56FE\uFF1A\u6298\u7EBF + series[].areaStyle\uFF1B\u5176\u4F59\u540C\u6298\u7EBF\u56FE"
72
+ notes: "\u9762\u79EF\u56FE\uFF1A\u6298\u7EBF + series[].areaStyle\uFF1B\u5176\u4F59\u540C\u6298\u7EBF\u56FE",
73
+ notesKey: "echarts.notes.area"
65
74
  },
66
75
  {
67
76
  type: "pieChart",
68
77
  label: "\u997C\u56FE",
78
+ labelKey: "echarts.series.typeNames.pie",
69
79
  icon: "ChartPie",
70
80
  seriesType: "pie",
71
- fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS],
81
+ fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "label"],
72
82
  requiredOptionKeys: BASE_REQUIRED,
73
83
  defaultWidth: 60,
74
84
  defaultHeight: 60,
75
- notes: "\u997C\u56FE\uFF1A\u7C7B\u76EE + \u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u751F\u6210 { name, value }\uFF1B\u53EA\u9700\u4E00\u4E2A\u6570\u503C\u5B57\u6BB5"
85
+ notes: "\u997C\u56FE\uFF1A\u7C7B\u76EE + \u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u751F\u6210 { name, value }\uFF1B\u53EA\u9700\u4E00\u4E2A\u6570\u503C\u5B57\u6BB5",
86
+ notesKey: "echarts.notes.pie"
76
87
  },
77
88
  {
78
89
  type: "doughnutChart",
79
90
  label: "\u73AF\u5F62\u56FE",
91
+ labelKey: "echarts.series.typeNames.doughnut",
80
92
  icon: "Donut",
81
93
  seriesType: "pie",
82
- fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "innerRadius"],
94
+ fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "innerRadius", "label"],
83
95
  requiredOptionKeys: BASE_REQUIRED,
84
96
  defaultWidth: 60,
85
97
  defaultHeight: 60,
86
- notes: "\u73AF\u5F62\u56FE\uFF1A\u997C\u56FE + radius:[\u5185\u5F84,\u5916\u5F84]\uFF1B\u5185\u5F84\u7531\u9762\u677F\u914D\u7F6E"
98
+ notes: "\u73AF\u5F62\u56FE\uFF1A\u997C\u56FE + radius:[\u5185\u5F84,\u5916\u5F84]\uFF1B\u5185\u5F84\u7531\u9762\u677F\u914D\u7F6E",
99
+ notesKey: "echarts.notes.doughnut"
87
100
  },
88
101
  {
89
102
  type: "scatterChart",
90
103
  label: "\u6563\u70B9\u56FE",
104
+ labelKey: "echarts.series.typeNames.scatter",
91
105
  icon: "ChartScatter",
92
106
  seriesType: "scatter",
93
- fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "bubble"],
107
+ fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "bubble", "label"],
94
108
  requiredOptionKeys: BASE_REQUIRED,
95
109
  defaultWidth: 80,
96
110
  defaultHeight: 60,
97
- notes: "\u6563\u70B9\u56FE\uFF1A\u7C7B\u76EE\u5B57\u6BB5\u4F5C x\u3001\u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C y\uFF1BchartBubble \u5F00\u542F\u65F6\u7528\u7B2C\u4E8C\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u70B9\u5927\u5C0F"
111
+ notes: "\u6563\u70B9\u56FE\uFF1A\u7C7B\u76EE\u5B57\u6BB5\u4F5C x\u3001\u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C y\uFF1BchartBubble \u5F00\u542F\u65F6\u7528\u7B2C\u4E8C\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u70B9\u5927\u5C0F",
112
+ notesKey: "echarts.notes.scatter"
98
113
  },
99
114
  {
100
115
  type: "radarChart",
101
116
  label: "\u96F7\u8FBE\u56FE",
117
+ labelKey: "echarts.series.typeNames.radar",
102
118
  icon: "Radar",
103
119
  seriesType: "radar",
104
- fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "radius"],
120
+ fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "radius", "label"],
105
121
  requiredOptionKeys: BASE_REQUIRED,
106
122
  defaultWidth: 70,
107
123
  defaultHeight: 60,
108
- notes: "\u96F7\u8FBE\u56FE\uFF1A\u6BCF\u4E2A\u6570\u503C\u5B57\u6BB5\u662F\u4E00\u4E2A\u7EF4\u5EA6\uFF08radar.indicator\uFF09\uFF0C\u6BCF\u884C\u6570\u636E\u662F\u4E00\u4E2A\u7CFB\u5217\uFF08\u7C7B\u76EE\u5B57\u6BB5\u4F5C\u7CFB\u5217\u540D\uFF09\uFF1B\u534A\u5F84\u7531\u9762\u677F\u5199 radar.radius\uFF08%\uFF0C\u9ED8\u8BA4 75\uFF09"
124
+ notes: "\u96F7\u8FBE\u56FE\uFF1A\u6BCF\u4E2A\u6570\u503C\u5B57\u6BB5\u662F\u4E00\u4E2A\u7EF4\u5EA6\uFF08radar.indicator\uFF09\uFF0C\u6BCF\u884C\u6570\u636E\u662F\u4E00\u4E2A\u7CFB\u5217\uFF08\u7C7B\u76EE\u5B57\u6BB5\u4F5C\u7CFB\u5217\u540D\uFF09\uFF1B\u534A\u5F84\u7531\u9762\u677F\u5199 radar.radius\uFF08%\uFF0C\u9ED8\u8BA4 75\uFF09",
125
+ notesKey: "echarts.notes.radar"
109
126
  },
110
127
  {
111
128
  type: "funnelChart",
112
129
  label: "\u6F0F\u6597\u56FE",
130
+ labelKey: "echarts.series.typeNames.funnel",
113
131
  icon: "Funnel",
114
132
  seriesType: "funnel",
115
- fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "padding"],
133
+ fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "padding", "label"],
116
134
  requiredOptionKeys: BASE_REQUIRED,
117
135
  defaultWidth: 60,
118
136
  defaultHeight: 60,
119
- notes: "\u6F0F\u6597\u56FE\uFF1A\u7C7B\u76EE + \u9996\u4E2A\u6570\u503C\u5B57\u6BB5\uFF0C\u6309\u6570\u503C\u964D\u5E8F\uFF1B\u56DB\u8FB9\u5185\u8FB9\u8DDD\u7531\u9762\u677F\u5199 series.left/right/top/bottom\uFF08%\uFF0C\u53F3\u4FA7\u9700\u7559\u5916\u7F6E\u6807\u7B7E\u7A7A\u95F4\uFF09"
137
+ notes: "\u6F0F\u6597\u56FE\uFF1A\u7C7B\u76EE + \u9996\u4E2A\u6570\u503C\u5B57\u6BB5\uFF0C\u6309\u6570\u503C\u964D\u5E8F\uFF1B\u56DB\u8FB9\u5185\u8FB9\u8DDD\u7531\u9762\u677F\u5199 series.left/right/top/bottom\uFF08%\uFF0C\u53F3\u4FA7\u9700\u7559\u5916\u7F6E\u6807\u7B7E\u7A7A\u95F4\uFF09",
138
+ notesKey: "echarts.notes.funnel"
120
139
  },
121
140
  {
122
141
  type: "gaugeChart",
123
142
  label: "\u4EEA\u8868\u76D8",
143
+ labelKey: "echarts.series.typeNames.gauge",
124
144
  icon: "Gauge",
125
145
  seriesType: "gauge",
126
- fields: ["dataSource", "valueFields", ...STYLE_FIELDS, "gaugeRange"],
146
+ fields: ["dataSource", "valueFields", ...STYLE_FIELDS, "gaugeRange", "label"],
127
147
  requiredOptionKeys: BASE_REQUIRED,
128
148
  defaultWidth: 60,
129
149
  defaultHeight: 60,
130
- notes: "\u4EEA\u8868\u76D8\uFF1A\u53D6\u9996\u884C\u6570\u636E\u7684\u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u6307\u9488\u503C\uFF1Bmin/max \u7531\u9762\u677F\u5199\u5165 series[0].min/max"
150
+ notes: "\u4EEA\u8868\u76D8\uFF1A\u53D6\u9996\u884C\u6570\u636E\u7684\u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u6307\u9488\u503C\uFF1Bmin/max \u7531\u9762\u677F\u5199\u5165 series[0].min/max",
151
+ notesKey: "echarts.notes.gauge"
131
152
  }
132
153
  ];
133
154
  var CHART_KINDS = CHART_KIND_DEFINITIONS.map((def) => def.type);
134
155
  function getChartKindDefinition(type) {
135
156
  return CHART_KIND_DEFINITIONS.find((def) => def.type === type);
136
157
  }
158
+ function resolveChartPanelFields(type) {
159
+ return getChartKindDefinition(type)?.fields ?? [];
160
+ }
137
161
 
138
162
  // src/bind.ts
139
163
  import { evaluateTemplate } from "@worm-print-platform/core";
@@ -141,16 +165,18 @@ function chartNumber(value) {
141
165
  const n = typeof value === "number" ? value : Number(value);
142
166
  return Number.isFinite(n) ? n : 0;
143
167
  }
144
- function evaluateChartOption(node, data) {
168
+ function evaluateChartOption(node, data, keepStrings = false) {
145
169
  if (typeof node === "string") {
146
170
  if (node.startsWith("$data")) return node;
171
+ if (keepStrings) return node;
147
172
  return node.includes("{") ? evaluateTemplate(node, data) : node;
148
173
  }
149
- if (Array.isArray(node)) return node.map((item) => evaluateChartOption(item, data));
174
+ if (Array.isArray(node)) return node.map((item) => evaluateChartOption(item, data, keepStrings));
150
175
  if (node && typeof node === "object") {
151
176
  const out = {};
152
177
  for (const [key, value] of Object.entries(node)) {
153
- out[key] = evaluateChartOption(value, data);
178
+ const childKeep = keepStrings || key === "label" || key === "detail";
179
+ out[key] = evaluateChartOption(value, data, childKeep);
154
180
  }
155
181
  return out;
156
182
  }
@@ -317,8 +343,17 @@ import { configurePlugin, getPluginConfig } from "@worm-print-platform/core/desi
317
343
 
318
344
  // src/constants.ts
319
345
  var CHART_PLUGIN_ID = "@worm-print-platform/echarts";
346
+ var CHART_PALETTES = [
347
+ { key: "default", label: "\u9ED8\u8BA4\u84DD", labelKey: "echarts.palette.default", colors: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de"] },
348
+ { key: "fresh", label: "\u6E05\u65B0\u7EFF", labelKey: "echarts.palette.fresh", colors: ["#2f9e6e", "#5cc9a7", "#9ad6c1", "#f2c94c", "#4a90e2"] },
349
+ { key: "warm", label: "\u6696\u6A59\u7EA2", labelKey: "echarts.palette.warm", colors: ["#f2704e", "#f7a35c", "#f7d56d", "#c54e3f", "#8f5a4a"] },
350
+ { key: "purple", label: "\u7D2B\u7070", labelKey: "echarts.palette.purple", colors: ["#7b61ff", "#9b8cff", "#c3baff", "#596275", "#8d99ae"] }
351
+ ];
352
+ var FALLBACK_SAMPLE_CATEGORIES = ["\u793A\u4F8B\u4E00", "\u793A\u4F8B\u4E8C", "\u793A\u4F8B\u4E09"];
320
353
  var FUNNEL_PADDING_DEFAULTS = { top: 6, right: 25, bottom: 6, left: 5 };
321
354
  var RADAR_RADIUS_DEFAULT = 75;
355
+ var ECHARTS_RADAR_RADIUS_DEFAULT = 50;
356
+ var ECHARTS_FUNNEL_PADDING_PX = { top: 60, right: 80, bottom: 65, left: 80 };
322
357
 
323
358
  // src/defaults.ts
324
359
  var GRID = { left: "8%", right: "8%", bottom: "12%", top: "18%", containLabel: true };
@@ -396,6 +431,19 @@ function createDefaultChartOption(type) {
396
431
  function getChartPluginConfig() {
397
432
  return getPluginConfig(CHART_PLUGIN_ID);
398
433
  }
434
+ function getChartPalettes() {
435
+ const overrides = getChartPluginConfig().palettes ?? {};
436
+ const builtin = CHART_PALETTES.map((palette) => {
437
+ const custom = overrides[palette.key];
438
+ return custom ? { key: palette.key, label: custom.label ?? palette.label, labelKey: custom.label ? void 0 : palette.labelKey, colors: custom.colors } : { key: palette.key, label: palette.label, labelKey: palette.labelKey, colors: palette.colors };
439
+ });
440
+ const extra = Object.entries(overrides).filter(([key]) => !CHART_PALETTES.some((palette) => palette.key === key)).map(([key, value]) => ({ key, label: value.label ?? key, colors: value.colors }));
441
+ return [...builtin, ...extra];
442
+ }
443
+ function getSampleCategories() {
444
+ const custom = getChartPluginConfig().sampleCategories;
445
+ return Array.isArray(custom) && custom.length > 0 ? custom : FALLBACK_SAMPLE_CATEGORIES;
446
+ }
399
447
  function chartFactoryDefaults(type, partial) {
400
448
  const config = getChartPluginConfig();
401
449
  const def = getChartKindDefinition(type);
@@ -447,6 +495,416 @@ function applyExtraComponents() {
447
495
  for (const item of fresh) appliedComponents.add(item);
448
496
  }
449
497
 
498
+ // src/units.ts
499
+ var PX_PER_MM = 96 / 25.4;
500
+ function mmToChartPx(mm) {
501
+ const value = Number.isFinite(mm) ? mm : 0;
502
+ return Math.max(1, Math.round(value * PX_PER_MM));
503
+ }
504
+
505
+ // src/option-utils.ts
506
+ var SAMPLE_VALUES = [12, 20, 15];
507
+ function cloneChartOption(value) {
508
+ try {
509
+ return JSON.parse(JSON.stringify(value));
510
+ } catch {
511
+ return value;
512
+ }
513
+ }
514
+ function previewChartOption(type, option) {
515
+ if (!option || typeof option !== "object" || Array.isArray(option)) return {};
516
+ const next = cloneChartOption(option);
517
+ const def = getChartKindDefinition(type);
518
+ const categories = [...getSampleCategories()];
519
+ const values = [...SAMPLE_VALUES];
520
+ const series = Array.isArray(next.series) ? next.series : [];
521
+ const replaceSeriesData = (mapper) => {
522
+ for (const item of series) {
523
+ if (Array.isArray(item.data) && item.data.includes("$data")) item.data = mapper(item);
524
+ }
525
+ };
526
+ const replaceAxisData = () => {
527
+ for (const key of ["xAxis", "yAxis"]) {
528
+ const axes = Array.isArray(next[key]) ? next[key] : next[key] ? [next[key]] : [];
529
+ for (const axis of axes) {
530
+ if (axis && Array.isArray(axis.data) && axis.data.includes("$data")) axis.data = [...categories];
531
+ }
532
+ }
533
+ };
534
+ switch (def?.seriesType) {
535
+ case "pie":
536
+ replaceSeriesData(() => categories.map((name, index) => ({ name, value: values[index] ?? 10 })));
537
+ break;
538
+ case "funnel":
539
+ replaceSeriesData(() => categories.map((name, index) => ({ name, value: values[index] ?? 10 })));
540
+ break;
541
+ case "scatter":
542
+ replaceSeriesData(() => values.map((value) => [value, value + 6]));
543
+ break;
544
+ case "radar":
545
+ next.radar = {
546
+ ...next.radar ?? {},
547
+ indicator: categories.map((name) => ({ name, max: 30 }))
548
+ };
549
+ replaceSeriesData(() => [{ name: "\u793A\u4F8B", value: values }]);
550
+ break;
551
+ case "gauge":
552
+ replaceSeriesData(() => [{ value: values[0] ?? 40, name: "\u6570\u91CF" }]);
553
+ break;
554
+ default:
555
+ replaceSeriesData(() => [...values]);
556
+ replaceAxisData();
557
+ break;
558
+ }
559
+ return next;
560
+ }
561
+ function readPaletteKey(option, palettes) {
562
+ const color = Array.isArray(option?.color) ? (option?.color).map(String) : [];
563
+ const hit = palettes.find((palette) => palette.colors.every((c, i) => c === color[i]) && color.length === palette.colors.length);
564
+ return hit?.key ?? "default";
565
+ }
566
+ function asObject(node) {
567
+ if (Array.isArray(node)) return node[0] && typeof node[0] === "object" ? { ...node[0] } : {};
568
+ return node && typeof node === "object" ? { ...node } : {};
569
+ }
570
+ function syncSeriesCount(option, count, type) {
571
+ const next = cloneChartOption(option);
572
+ const rawSeries = Array.isArray(next.series) ? next.series : [];
573
+ const def = getChartKindDefinition(type);
574
+ const template = rawSeries[0] ?? { type: def?.seriesType === "line" ? "line" : "bar", data: ["$data"] };
575
+ next.series = Array.from({ length: Math.max(count, 1) }, (_, index) => ({
576
+ ...template,
577
+ ...rawSeries[index] ?? {},
578
+ data: ["$data"]
579
+ }));
580
+ return next;
581
+ }
582
+ var round1 = (value) => Math.round(value * 10) / 10;
583
+ function pxToPercent(px, totalPx) {
584
+ return totalPx > 0 ? round1(px / totalPx * 100) : 0;
585
+ }
586
+ function readInsetPercent(value, totalPx, echartsPx) {
587
+ if (typeof value === "string" && value.trim().endsWith("%")) {
588
+ const parsed = Number.parseFloat(value);
589
+ if (Number.isFinite(parsed)) return round1(parsed);
590
+ }
591
+ if (typeof value === "number" && Number.isFinite(value)) return pxToPercent(value, totalPx);
592
+ return pxToPercent(echartsPx, totalPx);
593
+ }
594
+ function clamp(value, min, max) {
595
+ return Math.min(max, Math.max(min, value));
596
+ }
597
+ function percentString(value) {
598
+ return `${clamp(round1(value), 0, 100)}%`;
599
+ }
600
+ function firstSeries(option) {
601
+ const series = Array.isArray(option.series) ? option.series : [];
602
+ const first = series[0];
603
+ return first && typeof first === "object" ? first : {};
604
+ }
605
+ function readFunnelPadding(option, widthMm, heightMm) {
606
+ const source = option && typeof option === "object" ? option : {};
607
+ const series = firstSeries(source);
608
+ const widthPx = mmToChartPx(widthMm);
609
+ const heightPx = mmToChartPx(heightMm);
610
+ return {
611
+ top: readInsetPercent(series.top, heightPx, ECHARTS_FUNNEL_PADDING_PX.top),
612
+ right: readInsetPercent(series.right, widthPx, ECHARTS_FUNNEL_PADDING_PX.right),
613
+ bottom: readInsetPercent(series.bottom, heightPx, ECHARTS_FUNNEL_PADDING_PX.bottom),
614
+ left: readInsetPercent(series.left, widthPx, ECHARTS_FUNNEL_PADDING_PX.left)
615
+ };
616
+ }
617
+ function writeFunnelPadding(option, padding) {
618
+ const next = cloneChartOption(option);
619
+ const series = Array.isArray(next.series) ? next.series : [];
620
+ if (series.length === 0) series.push({ type: "funnel", data: ["$data"] });
621
+ const first = series[0];
622
+ first.top = percentString(padding.top);
623
+ first.right = percentString(padding.right);
624
+ first.bottom = percentString(padding.bottom);
625
+ first.left = percentString(padding.left);
626
+ next.series = series;
627
+ return next;
628
+ }
629
+ function readRadarRadius(option, widthMm, heightMm) {
630
+ const source = option && typeof option === "object" ? option : {};
631
+ const raw = asObject(source.radar).radius;
632
+ const value = Array.isArray(raw) ? raw[raw.length - 1] : raw;
633
+ const widthPx = mmToChartPx(widthMm);
634
+ const heightPx = mmToChartPx(heightMm);
635
+ const viewSize = Math.min(widthPx, heightPx) / 2;
636
+ if (typeof value === "string" && value.trim().endsWith("%")) {
637
+ const parsed = Number.parseFloat(value);
638
+ if (Number.isFinite(parsed)) return round1(parsed);
639
+ }
640
+ if (typeof value === "number" && Number.isFinite(value)) return pxToPercent(value, viewSize);
641
+ return ECHARTS_RADAR_RADIUS_DEFAULT;
642
+ }
643
+ function writeRadarRadius(option, percent) {
644
+ const next = cloneChartOption(option);
645
+ next.radar = { ...asObject(next.radar), radius: percentString(clamp(percent, 20, 100)) };
646
+ return next;
647
+ }
648
+
649
+ // src/label.ts
650
+ var LABEL_PRESETS = [
651
+ { key: "value", label: "\u6570\u503C", labelKey: "echarts.label.formatter.value", formatter: "{c}" },
652
+ { key: "name-value", label: "\u540D\u79F0: \u6570\u503C", labelKey: "echarts.label.formatter.nameValue", formatter: "{b}: {c}" },
653
+ { key: "name", label: "\u540D\u79F0", labelKey: "echarts.label.formatter.name", formatter: "{b}" },
654
+ { key: "percent", label: "\u767E\u5206\u6BD4", labelKey: "echarts.label.formatter.percent", formatter: "{d}%" }
655
+ ];
656
+ var LABEL_POSITIONS = {
657
+ bar: [
658
+ { value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.bar.top" },
659
+ { value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.bar.inside" },
660
+ { value: "insideTop", label: "\u5185\u90E8\u9876\u7AEF", labelKey: "echarts.label.position.bar.insideTop" },
661
+ { value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.bar.bottom" },
662
+ { value: "insideBottom", label: "\u5185\u90E8\u5E95\u7AEF", labelKey: "echarts.label.position.bar.insideBottom" },
663
+ { value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.bar.right" },
664
+ { value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.bar.left" },
665
+ { value: "middle", label: "\u5C45\u4E2D", labelKey: "echarts.label.position.bar.middle" }
666
+ ],
667
+ line: [
668
+ { value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.line.top" },
669
+ { value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.line.bottom" },
670
+ { value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.line.inside" },
671
+ { value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.line.left" },
672
+ { value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.line.right" }
673
+ ],
674
+ pie: [
675
+ { value: "outside", label: "\u5916\u4FA7", labelKey: "echarts.label.position.pie.outside" },
676
+ { value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.pie.inside" },
677
+ { value: "center", label: "\u4E2D\u5FC3", labelKey: "echarts.label.position.pie.center" }
678
+ ],
679
+ scatter: [
680
+ { value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.scatter.top" },
681
+ { value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.scatter.bottom" },
682
+ { value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.scatter.left" },
683
+ { value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.scatter.right" },
684
+ { value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.scatter.inside" }
685
+ ],
686
+ radar: [
687
+ { value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.radar.top" },
688
+ { value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.radar.bottom" },
689
+ { value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.radar.left" },
690
+ { value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.radar.right" },
691
+ { value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.radar.inside" }
692
+ ],
693
+ funnel: [
694
+ { value: "outer", label: "\u5916\u4FA7", labelKey: "echarts.label.position.funnel.outer" },
695
+ { value: "inner", label: "\u5185\u90E8", labelKey: "echarts.label.position.funnel.inner" },
696
+ { value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.funnel.left" },
697
+ { value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.funnel.right" },
698
+ { value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.funnel.top" },
699
+ { value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.funnel.bottom" }
700
+ ],
701
+ gauge: []
702
+ };
703
+ var NATIVE_SHOW = {
704
+ bar: false,
705
+ line: false,
706
+ pie: true,
707
+ scatter: false,
708
+ radar: false,
709
+ funnel: true,
710
+ gauge: true
711
+ };
712
+ var ENABLE_DEFAULTS = {
713
+ bar: { position: "top", fontSize: 12 },
714
+ line: { position: "top", fontSize: 12 },
715
+ pie: { position: "outside", overflow: "none", fontSize: 11 },
716
+ scatter: { position: "top", fontSize: 11 },
717
+ radar: { position: "top", fontSize: 10 },
718
+ funnel: { position: "outer", fontSize: 11 },
719
+ gauge: { fontSize: 14 }
720
+ };
721
+ var TYPE_DEFAULTS = {
722
+ barHChart: { position: "right", fontSize: 12 }
723
+ };
724
+ var FIELDS_BY_SERIES = {
725
+ bar: [
726
+ "formatter",
727
+ "overflow",
728
+ "position",
729
+ "rotate",
730
+ "offset",
731
+ "fontSize",
732
+ "fontWeight",
733
+ "color",
734
+ "backgroundColor",
735
+ "borderColor",
736
+ "borderWidth",
737
+ "borderRadius",
738
+ "padding"
739
+ ],
740
+ line: [
741
+ "formatter",
742
+ "overflow",
743
+ "position",
744
+ "rotate",
745
+ "offset",
746
+ "fontSize",
747
+ "fontWeight",
748
+ "color",
749
+ "backgroundColor",
750
+ "borderColor",
751
+ "borderWidth",
752
+ "borderRadius",
753
+ "padding"
754
+ ],
755
+ pie: [
756
+ "formatter",
757
+ "overflow",
758
+ "position",
759
+ "distance",
760
+ "offset",
761
+ "fontSize",
762
+ "fontWeight",
763
+ "color",
764
+ "backgroundColor",
765
+ "borderColor",
766
+ "borderWidth",
767
+ "borderRadius",
768
+ "padding",
769
+ "labelLine.show",
770
+ "labelLine.length",
771
+ "labelLine.length2",
772
+ "labelLine.smooth"
773
+ ],
774
+ scatter: [
775
+ "formatter",
776
+ "overflow",
777
+ "position",
778
+ "distance",
779
+ "rotate",
780
+ "offset",
781
+ "fontSize",
782
+ "fontWeight",
783
+ "color",
784
+ "backgroundColor",
785
+ "borderColor",
786
+ "borderWidth",
787
+ "borderRadius",
788
+ "padding"
789
+ ],
790
+ radar: ["formatter", "fontSize", "fontWeight", "color"],
791
+ funnel: [
792
+ "formatter",
793
+ "overflow",
794
+ "position",
795
+ "distance",
796
+ "fontSize",
797
+ "fontWeight",
798
+ "color",
799
+ "labelLine.show",
800
+ "labelLine.length",
801
+ "labelLine.smooth"
802
+ ],
803
+ gauge: ["formatter", "fontSize", "fontWeight", "color", "offset"]
804
+ };
805
+ var VALUE_KEYS = [
806
+ "formatter",
807
+ "overflow",
808
+ "position",
809
+ "distance",
810
+ "rotate",
811
+ "offset",
812
+ "fontSize",
813
+ "fontWeight",
814
+ "color",
815
+ "backgroundColor",
816
+ "borderColor",
817
+ "borderWidth",
818
+ "borderRadius",
819
+ "padding"
820
+ ];
821
+ function seriesOf2(option) {
822
+ const series = option?.series;
823
+ return Array.isArray(series) ? series : [];
824
+ }
825
+ function asRecord(node) {
826
+ return node && typeof node === "object" && !Array.isArray(node) ? { ...node } : {};
827
+ }
828
+ function normalizeLabelOffsetInPlace(target) {
829
+ if (typeof target.offsetX !== "number" && typeof target.offsetY !== "number") return;
830
+ if (!Array.isArray(target.offset)) {
831
+ target.offset = [
832
+ typeof target.offsetX === "number" ? target.offsetX : 0,
833
+ typeof target.offsetY === "number" ? target.offsetY : 0
834
+ ];
835
+ }
836
+ delete target.offsetX;
837
+ delete target.offsetY;
838
+ }
839
+ function labelTargetOf(type) {
840
+ return getChartKindDefinition(type)?.seriesType === "gauge" ? "detail" : "label";
841
+ }
842
+ function labelFieldsOf(type) {
843
+ const def = getChartKindDefinition(type);
844
+ return def ? FIELDS_BY_SERIES[def.seriesType] : [];
845
+ }
846
+ function readChartLabel(option, type) {
847
+ const def = getChartKindDefinition(type);
848
+ const series = seriesOf2(option);
849
+ const target = asRecord(series[0]?.[labelTargetOf(type)]);
850
+ normalizeLabelOffsetInPlace(target);
851
+ const state = {
852
+ show: typeof target.show === "boolean" ? target.show : def ? NATIVE_SHOW[def.seriesType] : false,
853
+ // labelLine 在 ECharts 里是 series 顶层键(与 label 平级),不是 label 的子键
854
+ labelLine: asRecord(series[0]?.labelLine)
855
+ };
856
+ for (const key of VALUE_KEYS) {
857
+ const value = target[key];
858
+ if (key === "offset") continue;
859
+ if (typeof value === "string" || typeof value === "number") state[key] = value;
860
+ }
861
+ const offset = target.offset;
862
+ if (Array.isArray(offset) && typeof offset[0] === "number" && typeof offset[1] === "number") {
863
+ state.offset = [offset[0], offset[1]];
864
+ }
865
+ return state;
866
+ }
867
+ function defaultSetOf(type) {
868
+ const def = getChartKindDefinition(type);
869
+ if (!def) return {};
870
+ return { ...ENABLE_DEFAULTS[def.seriesType], ...TYPE_DEFAULTS[type] };
871
+ }
872
+ function isEmpty(value) {
873
+ return value === null || value === void 0 || value === "";
874
+ }
875
+ function updateChartLabel(option, type, patch) {
876
+ const next = cloneChartOption(option ?? {});
877
+ const series = Array.isArray(next.series) ? next.series : [];
878
+ const def = getChartKindDefinition(type);
879
+ if (!def || series.length === 0) return next;
880
+ const targetKey = labelTargetOf(type);
881
+ const { enabled, labelLine, ...values } = patch;
882
+ for (const item of series) {
883
+ if (!item || typeof item !== "object") continue;
884
+ const current = asRecord(item[targetKey]);
885
+ normalizeLabelOffsetInPlace(current);
886
+ if (enabled === true) {
887
+ Object.assign(current, { ...defaultSetOf(type), ...current, show: true });
888
+ } else if (enabled === false) {
889
+ current.show = false;
890
+ }
891
+ for (const [key, value] of Object.entries(values)) {
892
+ if (isEmpty(value)) delete current[key];
893
+ else current[key] = value;
894
+ }
895
+ if (labelLine) {
896
+ const line = asRecord(item.labelLine);
897
+ for (const [key, value] of Object.entries(labelLine)) {
898
+ if (isEmpty(value)) delete line[key];
899
+ else line[key] = value;
900
+ }
901
+ item.labelLine = line;
902
+ }
903
+ item[targetKey] = current;
904
+ }
905
+ return next;
906
+ }
907
+
450
908
  // src/normalize.ts
451
909
  function asArray(value) {
452
910
  if (Array.isArray(value)) return value.map((item) => ({ ...item }));
@@ -475,6 +933,15 @@ function normalizeChartOption(type, option) {
475
933
  const next = structuredClone(option);
476
934
  const series = asArray(next.series);
477
935
  if (series.length === 0) return next;
936
+ const labelKey = labelTargetOf(type);
937
+ for (const item of series) {
938
+ const label = item[labelKey];
939
+ if (label && typeof label === "object" && !Array.isArray(label)) {
940
+ const nextLabel = { ...label };
941
+ normalizeLabelOffsetInPlace(nextLabel);
942
+ item[labelKey] = nextLabel;
943
+ }
944
+ }
478
945
  if (def.seriesType === "pie") {
479
946
  next.series = series.map((item) => ({
480
947
  ...item,
@@ -516,13 +983,6 @@ function normalizeChartOption(type, option) {
516
983
  return next;
517
984
  }
518
985
 
519
- // src/units.ts
520
- var PX_PER_MM = 96 / 25.4;
521
- function mmToChartPx(mm) {
522
- const value = Number.isFinite(mm) ? mm : 0;
523
- return Math.max(1, Math.round(value * PX_PER_MM));
524
- }
525
-
526
986
  // src/renderer.ts
527
987
  function fitSvgRoot(svg, widthPx, heightPx) {
528
988
  const match = /<svg\b[^>]*>/i.exec(svg);
@@ -587,26 +1047,32 @@ var CHART_EXECUTOR_VERSION = "2";
587
1047
 
588
1048
  // src/plugin.ts
589
1049
  var CHART_OPTION_META = {
590
- chartOption: { kind: "object", label: "\u56FE\u8868 option" },
591
- chartDataSource: { kind: "text", label: "\u6570\u636E\u6E90" },
592
- chartCategoryField: { kind: "text", label: "\u7C7B\u76EE\u5B57\u6BB5" },
593
- chartValueFields: { kind: "object", label: "\u6570\u503C\u5B57\u6BB5" },
594
- chartSeriesField: { kind: "text", label: "\u7CFB\u5217\u62C6\u5206\u5B57\u6BB5" }
1050
+ chartOption: { kind: "object", label: t("echarts.meta.chartOption") },
1051
+ chartDataSource: { kind: "text", label: t("echarts.meta.dataSource") },
1052
+ chartCategoryField: { kind: "text", label: t("echarts.meta.categoryField") },
1053
+ chartValueFields: { kind: "object", label: t("echarts.meta.valueFields") },
1054
+ chartSeriesField: { kind: "text", label: t("echarts.meta.seriesField") }
595
1055
  };
596
1056
  var SCATTER_OPTION_META = {
597
1057
  ...CHART_OPTION_META,
598
- chartBubble: { kind: "bool", label: "\u6C14\u6CE1\u5927\u5C0F" }
1058
+ chartBubble: { kind: "bool", label: t("echarts.meta.bubbleSize") }
599
1059
  };
600
1060
  var CHART_PLUGIN = defineElementPlugin({
601
1061
  id: CHART_PLUGIN_ID,
602
1062
  version: CHART_EXECUTOR_VERSION,
603
1063
  kinds: CHART_KIND_DEFINITIONS.map((def) => ({
604
1064
  type: def.type,
605
- label: def.label,
1065
+ // getter:每次读取按当前实例语言取词,避免模块加载期冻结为单一语言
1066
+ get label() {
1067
+ return t(def.labelKey);
1068
+ },
606
1069
  icon: def.icon,
607
1070
  fixedHeight: true,
608
1071
  requiredOptionKeys: def.requiredOptionKeys,
609
- notes: def.notes,
1072
+ // getter:每次读取按当前实例语言取词,避免模块加载期冻结为单一语言
1073
+ get notes() {
1074
+ return t(def.notesKey);
1075
+ },
610
1076
  optionMeta: def.type === "scatterChart" ? SCATTER_OPTION_META : CHART_OPTION_META,
611
1077
  defaultOptions: (partial) => chartFactoryDefaults(def.type, partial),
612
1078
  binding: { bind: (options, data) => bindChartData(def.type, options, data) }
@@ -638,34 +1104,509 @@ registerChartPlugin();
638
1104
  // src/index.ts
639
1105
  registerChartPlugin();
640
1106
 
1107
+ // src/ui.ts
1108
+ import { t as globalT } from "@worm-print-platform/core/i18n";
1109
+
1110
+ // src/i18n/zh-CN.json
1111
+ var zh_CN_default = {
1112
+ echarts: {
1113
+ "echarts.panel.chart": "\u56FE\u8868",
1114
+ "echarts.panel.config": "\u914D\u7F6E",
1115
+ "echarts.panel.dataSource": "\u6570\u636E\u6E90",
1116
+ "echarts.panel.category": "\u7C7B\u76EE",
1117
+ "echarts.panel.value": "\u6570\u503C",
1118
+ "echarts.panel.series": "\u7CFB\u5217",
1119
+ "echarts.panel.chartType.bar": "\u67F1\u72B6",
1120
+ "echarts.panel.chartType.barH": "\u6761\u5F62",
1121
+ "echarts.panel.chartType.line": "\u6298\u7EBF",
1122
+ "echarts.panel.chartType.area": "\u9762\u79EF",
1123
+ "echarts.panel.chartType.pie": "\u997C",
1124
+ "echarts.panel.chartType.doughnut": "\u73AF\u5F62",
1125
+ "echarts.panel.chartType.scatter": "\u6563\u70B9",
1126
+ "echarts.panel.chartType.radar": "\u96F7\u8FBE",
1127
+ "echarts.panel.chartType.funnel": "\u6F0F\u6597",
1128
+ "echarts.panel.chartType.gauge": "\u4EEA\u8868",
1129
+ "echarts.panel.dataLabel": "\u6570\u636E\u6807\u7B7E",
1130
+ "echarts.panel.valueLabel": "\u6570\u503C\u6807\u7B7E",
1131
+ "echarts.panel.hint.dataBinding": "\u6570\u636E\u7531\u6A21\u677F\u7ED1\u5B9A\u9636\u6BB5\u6CE8\u5165\uFF1Aseries/xAxis \u7684 data \u4FDD\u7559 `$data` \u5360\u4F4D\u5373\u53EF\uFF1B\u590D\u6742\u6837\u5F0F\u53EF\u5728\u6A21\u677F JSON \u4E2D\u624B\u5199 chartOption\u3002",
1132
+ "echarts.panel.field.dimension": "\u7EF4\u5EA6\u5B57\u6BB5\uFF08\u6BCF\u4E2A\u5B57\u6BB5\u4E00\u4E2A\u7EF4\u5EA6\uFF09",
1133
+ "echarts.panel.field.value": "\u6570\u503C\u5B57\u6BB5",
1134
+ "echarts.panel.field.valueMulti": "\u6570\u503C\u5B57\u6BB5\uFF08\u591A\u503C\u591A\u7CFB\u5217\uFF09",
1135
+ "echarts.panel.default": "\uFF08\u9ED8\u8BA4\uFF09",
1136
+ "echarts.panel.current": "\uFF08\u5F53\u524D\uFF09",
1137
+ "echarts.panel.defaultFirstArray": "\uFF08\u9ED8\u8BA4\uFF1A\u9876\u5C42\u7B2C\u4E00\u4E2A\u6570\u7EC4\uFF09",
1138
+ "echarts.panel.error.invalidOption": "\u56FE\u8868 option \u975E\u6CD5\uFF1A\u9700\u8981\u5BF9\u8C61",
1139
+ "echarts.panel.chartFallback": "\u56FE\u8868",
1140
+ "echarts.panel.optionDefault": "\uFF08\u9ED8\u8BA4\uFF09",
1141
+ "echarts.panel.overflow.default": "\u9ED8\u8BA4",
1142
+ "echarts.panel.overflow.none": "\u4E0D\u5904\u7406\uFF08\u663E\u793A\u5B8C\u6574\uFF09",
1143
+ "echarts.panel.overflow.truncate": "\u622A\u65AD",
1144
+ "echarts.panel.overflow.break": "\u6362\u884C",
1145
+ "echarts.panel.fontWeight.default": "\u9ED8\u8BA4",
1146
+ "echarts.panel.fontWeight.normal": "\u5E38\u89C4",
1147
+ "echarts.panel.fontWeight.bold": "\u52A0\u7C97",
1148
+ "echarts.panel.label.distance": "\u8DDD\u79BB",
1149
+ "echarts.panel.label.rotate": "\u65CB\u8F6C\uFF08\u5EA6\uFF09",
1150
+ "echarts.panel.label.fontSize": "\u5B57\u53F7",
1151
+ "echarts.panel.label.fontWeight": "\u5B57\u91CD",
1152
+ "echarts.panel.label.color": "\u6587\u5B57\u989C\u8272",
1153
+ "echarts.panel.label.backgroundColor": "\u80CC\u666F\u8272",
1154
+ "echarts.panel.label.borderColor": "\u8FB9\u6846\u8272",
1155
+ "echarts.panel.label.borderWidth": "\u8FB9\u6846\u5BBD\u5EA6",
1156
+ "echarts.panel.label.borderRadius": "\u5706\u89D2",
1157
+ "echarts.panel.label.padding": "\u5185\u8FB9\u8DDD",
1158
+ "echarts.panel.label.show": "\u663E\u793A\u6570\u636E\u6807\u7B7E",
1159
+ "echarts.panel.label.content": "\u5185\u5BB9",
1160
+ "echarts.panel.label.formatterTitle": "\u6570\u636E\u6807\u7B7E\u5185\u5BB9",
1161
+ "echarts.panel.label.formatterCustom": "\u81EA\u5B9A\u4E49 / \u9ED8\u8BA4",
1162
+ "echarts.panel.label.formatterPlaceholder": "\u5982 {b}: {c}",
1163
+ "echarts.panel.label.overflow": "\u6EA2\u51FA\u5904\u7406",
1164
+ "echarts.panel.label.position": "\u4F4D\u7F6E",
1165
+ "echarts.panel.label.positionTitle": "\u6807\u7B7E\u4F4D\u7F6E",
1166
+ "echarts.panel.label.positionDefault": "\u9ED8\u8BA4",
1167
+ "echarts.panel.label.offset": "\u504F\u79FB X / Y",
1168
+ "echarts.panel.label.style": "\u6837\u5F0F",
1169
+ "echarts.panel.labelLine.fontWeight": "\u5B57\u91CD",
1170
+ "echarts.panel.labelLine": "\u5F15\u5BFC\u7EBF",
1171
+ "echarts.panel.labelLine.show": "\u663E\u793A\u5F15\u5BFC\u7EBF",
1172
+ "echarts.panel.labelLine.length": "\u5F15\u5BFC\u7EBF\u957F\u5EA6",
1173
+ "echarts.panel.labelLine.length2": "\u7B2C\u4E8C\u6BB5\u957F\u5EA6",
1174
+ "echarts.panel.labelLine.smooth": "\u5E73\u6ED1\u5F15\u5BFC\u7EBF",
1175
+ "echarts.panel.dataSourceTitle": "\u6570\u636E\u6E90",
1176
+ "echarts.panel.categoryField": "\u7C7B\u76EE\u5B57\u6BB5",
1177
+ "echarts.panel.removeField": "\u5220\u9664\u8BE5\u5B57\u6BB5",
1178
+ "echarts.panel.addField": "+ \u6DFB\u52A0\u5B57\u6BB5",
1179
+ "echarts.panel.seriesField": "\u7CFB\u5217\u62C6\u5206\u5B57\u6BB5",
1180
+ "echarts.panel.seriesFieldHint": "\u53EF\u9009\uFF0C\u5982 region\uFF08\u6309\u503C\u62C6\u6210\u591A\u7CFB\u5217\uFF09",
1181
+ "echarts.panel.bubbleSize": "\u6C14\u6CE1\u5927\u5C0F",
1182
+ "echarts.panel.title": "\u56FE\u8868\u6807\u9898",
1183
+ "echarts.panel.titleHint": "\u7559\u7A7A\u4E0D\u663E\u793A\u6807\u9898",
1184
+ "echarts.panel.legend": "\u663E\u793A\u56FE\u4F8B",
1185
+ "echarts.panel.palette": "\u914D\u8272",
1186
+ "echarts.palette.default": "\u9ED8\u8BA4\u84DD",
1187
+ "echarts.palette.fresh": "\u6E05\u65B0\u7EFF",
1188
+ "echarts.palette.warm": "\u6696\u6A59\u7EA2",
1189
+ "echarts.palette.purple": "\u7D2B\u7070",
1190
+ "echarts.panel.stack": "\u5806\u53E0\u663E\u793A",
1191
+ "echarts.panel.innerRadius": "\u5185\u5F84\uFF08%\uFF09",
1192
+ "echarts.panel.paddingTRBL": "\u5185\u8FB9\u8DDD \u4E0A/\u53F3/\u4E0B/\u5DE6 (%)",
1193
+ "echarts.panel.paddingTop": "\u4E0A\u8FB9\u8DDD",
1194
+ "echarts.panel.paddingRight": "\u53F3\u8FB9\u8DDD\uFF08\u7559\u5916\u7F6E\u6807\u7B7E\uFF09",
1195
+ "echarts.panel.paddingBottom": "\u4E0B\u8FB9\u8DDD",
1196
+ "echarts.panel.paddingLeft": "\u5DE6\u8FB9\u8DDD",
1197
+ "echarts.panel.radius": "\u534A\u5F84\uFF08%\uFF09",
1198
+ "echarts.panel.minMax": "\u6700\u5C0F / \u6700\u5927\u503C",
1199
+ "echarts.panel.group": "\u56FE\u8868",
1200
+ "echarts.series.typeNames.bar": "\u67F1\u72B6\u56FE",
1201
+ "echarts.series.typeNames.barH": "\u6761\u5F62\u56FE",
1202
+ "echarts.series.typeNames.line": "\u6298\u7EBF\u56FE",
1203
+ "echarts.series.typeNames.area": "\u9762\u79EF\u56FE",
1204
+ "echarts.series.typeNames.pie": "\u997C\u56FE",
1205
+ "echarts.series.typeNames.doughnut": "\u73AF\u5F62\u56FE",
1206
+ "echarts.series.typeNames.scatter": "\u6563\u70B9\u56FE",
1207
+ "echarts.series.typeNames.radar": "\u96F7\u8FBE\u56FE",
1208
+ "echarts.series.typeNames.funnel": "\u6F0F\u6597\u56FE",
1209
+ "echarts.series.typeNames.gauge": "\u4EEA\u8868\u76D8",
1210
+ "echarts.label.formatter.value": "\u6570\u503C",
1211
+ "echarts.label.formatter.nameValue": "\u540D\u79F0: \u6570\u503C",
1212
+ "echarts.label.formatter.name": "\u540D\u79F0",
1213
+ "echarts.label.formatter.percent": "\u767E\u5206\u6BD4",
1214
+ "echarts.label.position.bar.top": "\u9876\u90E8",
1215
+ "echarts.label.position.bar.inside": "\u5185\u90E8",
1216
+ "echarts.label.position.bar.insideTop": "\u5185\u90E8\u9876\u7AEF",
1217
+ "echarts.label.position.bar.bottom": "\u5E95\u90E8",
1218
+ "echarts.label.position.bar.insideBottom": "\u5185\u90E8\u5E95\u7AEF",
1219
+ "echarts.label.position.bar.right": "\u53F3\u4FA7",
1220
+ "echarts.label.position.bar.left": "\u5DE6\u4FA7",
1221
+ "echarts.label.position.bar.middle": "\u5C45\u4E2D",
1222
+ "echarts.label.position.line.top": "\u9876\u90E8",
1223
+ "echarts.label.position.line.bottom": "\u5E95\u90E8",
1224
+ "echarts.label.position.line.inside": "\u5185\u90E8",
1225
+ "echarts.label.position.line.left": "\u5DE6\u4FA7",
1226
+ "echarts.label.position.line.right": "\u53F3\u4FA7",
1227
+ "echarts.label.position.pie.outside": "\u5916\u4FA7",
1228
+ "echarts.label.position.pie.inside": "\u5185\u90E8",
1229
+ "echarts.label.position.pie.center": "\u4E2D\u5FC3",
1230
+ "echarts.label.position.scatter.top": "\u9876\u90E8",
1231
+ "echarts.label.position.scatter.bottom": "\u5E95\u90E8",
1232
+ "echarts.label.position.scatter.left": "\u5DE6\u4FA7",
1233
+ "echarts.label.position.scatter.right": "\u53F3\u4FA7",
1234
+ "echarts.label.position.scatter.inside": "\u5185\u90E8",
1235
+ "echarts.label.position.radar.top": "\u9876\u90E8",
1236
+ "echarts.label.position.radar.bottom": "\u5E95\u90E8",
1237
+ "echarts.label.position.radar.left": "\u5DE6\u4FA7",
1238
+ "echarts.label.position.radar.right": "\u53F3\u4FA7",
1239
+ "echarts.label.position.radar.inside": "\u5185\u90E8",
1240
+ "echarts.label.position.funnel.outer": "\u5916\u4FA7",
1241
+ "echarts.label.position.funnel.inner": "\u5185\u90E8",
1242
+ "echarts.label.position.funnel.left": "\u5DE6\u4FA7",
1243
+ "echarts.label.position.funnel.right": "\u53F3\u4FA7",
1244
+ "echarts.label.position.funnel.top": "\u9876\u90E8",
1245
+ "echarts.label.position.funnel.bottom": "\u5E95\u90E8",
1246
+ "echarts.meta.chartOption": "\u56FE\u8868 option",
1247
+ "echarts.meta.dataSource": "\u6570\u636E\u6E90",
1248
+ "echarts.meta.categoryField": "\u7C7B\u76EE\u5B57\u6BB5",
1249
+ "echarts.meta.valueFields": "\u6570\u503C\u5B57\u6BB5",
1250
+ "echarts.meta.seriesField": "\u7CFB\u5217\u62C6\u5206\u5B57\u6BB5",
1251
+ "echarts.meta.bubbleSize": "\u6C14\u6CE1\u5927\u5C0F",
1252
+ "echarts.notes.bar": "\u67F1\u72B6\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF0C\u6BCF\u5B57\u6BB5\u4E00\u4E2A series\uFF1Bseries[].data \u5199 $data \u5360\u4F4D\uFF1B\u56FA\u5B9A\u9AD8\uFF0C\u7981\u6B62 autoHeight",
1253
+ "echarts.notes.barH": "\u6A2A\u5411\u6761\u5F62\u56FE\uFF1AxAxis \u4E3A\u6570\u503C\u3001yAxis \u4E3A\u7C7B\u76EE\uFF1B\u7C7B\u76EE\u5199 yAxis.data \u7684 $data \u5360\u4F4D",
1254
+ "echarts.notes.line": "\u6298\u7EBF\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF1B\u4E0D\u5199 areaStyle",
1255
+ "echarts.notes.area": "\u9762\u79EF\u56FE\uFF1A\u6298\u7EBF + series[].areaStyle\uFF1B\u5176\u4F59\u540C\u6298\u7EBF\u56FE",
1256
+ "echarts.notes.pie": "\u997C\u56FE\uFF1A\u7C7B\u76EE + \u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u751F\u6210 { name, value }\uFF1B\u53EA\u9700\u4E00\u4E2A\u6570\u503C\u5B57\u6BB5",
1257
+ "echarts.notes.doughnut": "\u73AF\u5F62\u56FE\uFF1A\u997C\u56FE + radius:[\u5185\u5F84,\u5916\u5F84]\uFF1B\u5185\u5F84\u7531\u9762\u677F\u914D\u7F6E",
1258
+ "echarts.notes.scatter": "\u6563\u70B9\u56FE\uFF1A\u7C7B\u76EE\u5B57\u6BB5\u4F5C x\u3001\u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C y\uFF1BchartBubble \u5F00\u542F\u65F6\u7528\u7B2C\u4E8C\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u70B9\u5927\u5C0F",
1259
+ "echarts.notes.radar": "\u96F7\u8FBE\u56FE\uFF1A\u6BCF\u4E2A\u6570\u503C\u5B57\u6BB5\u662F\u4E00\u4E2A\u7EF4\u5EA6\uFF08radar.indicator\uFF09\uFF0C\u6BCF\u884C\u6570\u636E\u662F\u4E00\u4E2A\u7CFB\u5217\uFF08\u7C7B\u76EE\u5B57\u6BB5\u4F5C\u7CFB\u5217\u540D\uFF09\uFF1B\u534A\u5F84\u7531\u9762\u677F\u5199 radar.radius\uFF08%\uFF0C\u9ED8\u8BA4 75\uFF09",
1260
+ "echarts.notes.funnel": "\u6F0F\u6597\u56FE\uFF1A\u7C7B\u76EE + \u9996\u4E2A\u6570\u503C\u5B57\u6BB5\uFF0C\u6309\u6570\u503C\u964D\u5E8F\uFF1B\u56DB\u8FB9\u5185\u8FB9\u8DDD\u7531\u9762\u677F\u5199 series.left/right/top/bottom\uFF08%\uFF0C\u53F3\u4FA7\u9700\u7559\u5916\u7F6E\u6807\u7B7E\u7A7A\u95F4\uFF09",
1261
+ "echarts.notes.gauge": "\u4EEA\u8868\u76D8\uFF1A\u53D6\u9996\u884C\u6570\u636E\u7684\u9996\u4E2A\u6570\u503C\u5B57\u6BB5\u4F5C\u6307\u9488\u503C\uFF1Bmin/max \u7531\u9762\u677F\u5199\u5165 series[0].min/max"
1262
+ }
1263
+ };
1264
+
1265
+ // src/i18n/en-US.json
1266
+ var en_US_default = {
1267
+ echarts: {
1268
+ "echarts.panel.chart": "Chart",
1269
+ "echarts.panel.config": "Config",
1270
+ "echarts.panel.dataSource": "Data source",
1271
+ "echarts.panel.category": "Category",
1272
+ "echarts.panel.value": "Value",
1273
+ "echarts.panel.series": "Series",
1274
+ "echarts.panel.chartType.bar": "Bar",
1275
+ "echarts.panel.chartType.barH": "Horizontal bar",
1276
+ "echarts.panel.chartType.line": "Line",
1277
+ "echarts.panel.chartType.area": "Area",
1278
+ "echarts.panel.chartType.pie": "Pie",
1279
+ "echarts.panel.chartType.doughnut": "Doughnut",
1280
+ "echarts.panel.chartType.scatter": "Scatter",
1281
+ "echarts.panel.chartType.radar": "Radar",
1282
+ "echarts.panel.chartType.funnel": "Funnel",
1283
+ "echarts.panel.chartType.gauge": "Gauge",
1284
+ "echarts.panel.dataLabel": "Data label",
1285
+ "echarts.panel.valueLabel": "Value label",
1286
+ "echarts.panel.hint.dataBinding": "Data is injected at template binding; keep the `$data` placeholder in series/xAxis data; advanced styles can be written in chartOption in the template JSON.",
1287
+ "echarts.panel.field.dimension": "Dimension fields (one per dimension)",
1288
+ "echarts.panel.field.value": "Value fields",
1289
+ "echarts.panel.field.valueMulti": "Value fields (multiple values, multiple series)",
1290
+ "echarts.panel.default": "(default)",
1291
+ "echarts.panel.current": "(current)",
1292
+ "echarts.panel.defaultFirstArray": "(default: first top-level array)",
1293
+ "echarts.panel.error.invalidOption": "Invalid chart option: expected an object",
1294
+ "echarts.panel.chartFallback": "Chart",
1295
+ "echarts.panel.optionDefault": "(default)",
1296
+ "echarts.panel.overflow.default": "Default",
1297
+ "echarts.panel.overflow.none": "None (show full)",
1298
+ "echarts.panel.overflow.truncate": "Truncate",
1299
+ "echarts.panel.overflow.break": "Wrap",
1300
+ "echarts.panel.fontWeight.default": "Default",
1301
+ "echarts.panel.fontWeight.normal": "Regular",
1302
+ "echarts.panel.fontWeight.bold": "Bold",
1303
+ "echarts.panel.label.distance": "Distance",
1304
+ "echarts.panel.label.rotate": "Rotation (deg)",
1305
+ "echarts.panel.label.fontSize": "Font size",
1306
+ "echarts.panel.label.fontWeight": "Font weight",
1307
+ "echarts.panel.label.color": "Text color",
1308
+ "echarts.panel.label.backgroundColor": "Background color",
1309
+ "echarts.panel.label.borderColor": "Border color",
1310
+ "echarts.panel.label.borderWidth": "Border width",
1311
+ "echarts.panel.label.borderRadius": "Radius",
1312
+ "echarts.panel.label.padding": "Padding",
1313
+ "echarts.panel.label.show": "Show data labels",
1314
+ "echarts.panel.label.content": "Content",
1315
+ "echarts.panel.label.formatterTitle": "Data label content",
1316
+ "echarts.panel.label.formatterCustom": "Custom / Default",
1317
+ "echarts.panel.label.formatterPlaceholder": "e.g. {b}: {c}",
1318
+ "echarts.panel.label.overflow": "Overflow",
1319
+ "echarts.panel.label.position": "Position",
1320
+ "echarts.panel.label.positionTitle": "Label position",
1321
+ "echarts.panel.label.positionDefault": "Default",
1322
+ "echarts.panel.label.offset": "Offset X / Y",
1323
+ "echarts.panel.label.style": "Style",
1324
+ "echarts.panel.labelLine.fontWeight": "Font weight",
1325
+ "echarts.panel.labelLine": "Label line",
1326
+ "echarts.panel.labelLine.show": "Show label line",
1327
+ "echarts.panel.labelLine.length": "Label line length",
1328
+ "echarts.panel.labelLine.length2": "Second segment length",
1329
+ "echarts.panel.labelLine.smooth": "Smooth label line",
1330
+ "echarts.panel.dataSourceTitle": "Data source",
1331
+ "echarts.panel.categoryField": "Category field",
1332
+ "echarts.panel.removeField": "Remove this field",
1333
+ "echarts.panel.addField": "+ Add field",
1334
+ "echarts.panel.seriesField": "Series split field",
1335
+ "echarts.panel.seriesFieldHint": "Optional, e.g. region (splits into series by value)",
1336
+ "echarts.panel.bubbleSize": "Bubble size",
1337
+ "echarts.panel.title": "Chart title",
1338
+ "echarts.panel.titleHint": "Leave empty to hide the title",
1339
+ "echarts.panel.legend": "Show legend",
1340
+ "echarts.panel.palette": "Color palette",
1341
+ "echarts.palette.default": "Default blue",
1342
+ "echarts.palette.fresh": "Fresh green",
1343
+ "echarts.palette.warm": "Warm orange-red",
1344
+ "echarts.palette.purple": "Purple grey",
1345
+ "echarts.panel.stack": "Stacked",
1346
+ "echarts.panel.innerRadius": "Inner radius (%)",
1347
+ "echarts.panel.paddingTRBL": "Padding top/right/bottom/left (%)",
1348
+ "echarts.panel.paddingTop": "Top padding",
1349
+ "echarts.panel.paddingRight": "Right padding (for outer labels)",
1350
+ "echarts.panel.paddingBottom": "Bottom padding",
1351
+ "echarts.panel.paddingLeft": "Left padding",
1352
+ "echarts.panel.radius": "Radius (%)",
1353
+ "echarts.panel.minMax": "Min / max",
1354
+ "echarts.panel.group": "Chart",
1355
+ "echarts.series.typeNames.bar": "Bar chart",
1356
+ "echarts.series.typeNames.barH": "Horizontal bar chart",
1357
+ "echarts.series.typeNames.line": "Line chart",
1358
+ "echarts.series.typeNames.area": "Area chart",
1359
+ "echarts.series.typeNames.pie": "Pie chart",
1360
+ "echarts.series.typeNames.doughnut": "Doughnut chart",
1361
+ "echarts.series.typeNames.scatter": "Scatter chart",
1362
+ "echarts.series.typeNames.radar": "Radar chart",
1363
+ "echarts.series.typeNames.funnel": "Funnel chart",
1364
+ "echarts.series.typeNames.gauge": "Gauge chart",
1365
+ "echarts.label.formatter.value": "Value",
1366
+ "echarts.label.formatter.nameValue": "Name: Value",
1367
+ "echarts.label.formatter.name": "Name",
1368
+ "echarts.label.formatter.percent": "Percentage",
1369
+ "echarts.label.position.bar.top": "Top",
1370
+ "echarts.label.position.bar.inside": "Inside",
1371
+ "echarts.label.position.bar.insideTop": "Inside top",
1372
+ "echarts.label.position.bar.bottom": "Bottom",
1373
+ "echarts.label.position.bar.insideBottom": "Inside bottom",
1374
+ "echarts.label.position.bar.right": "Right",
1375
+ "echarts.label.position.bar.left": "Left",
1376
+ "echarts.label.position.bar.middle": "Center",
1377
+ "echarts.label.position.line.top": "Top",
1378
+ "echarts.label.position.line.bottom": "Bottom",
1379
+ "echarts.label.position.line.inside": "Inside",
1380
+ "echarts.label.position.line.left": "Left",
1381
+ "echarts.label.position.line.right": "Right",
1382
+ "echarts.label.position.pie.outside": "Outside",
1383
+ "echarts.label.position.pie.inside": "Inside",
1384
+ "echarts.label.position.pie.center": "Center",
1385
+ "echarts.label.position.scatter.top": "Top",
1386
+ "echarts.label.position.scatter.bottom": "Bottom",
1387
+ "echarts.label.position.scatter.left": "Left",
1388
+ "echarts.label.position.scatter.right": "Right",
1389
+ "echarts.label.position.scatter.inside": "Inside",
1390
+ "echarts.label.position.radar.top": "Top",
1391
+ "echarts.label.position.radar.bottom": "Bottom",
1392
+ "echarts.label.position.radar.left": "Left",
1393
+ "echarts.label.position.radar.right": "Right",
1394
+ "echarts.label.position.radar.inside": "Inside",
1395
+ "echarts.label.position.funnel.outer": "Outside",
1396
+ "echarts.label.position.funnel.inner": "Inside",
1397
+ "echarts.label.position.funnel.left": "Left",
1398
+ "echarts.label.position.funnel.right": "Right",
1399
+ "echarts.label.position.funnel.top": "Top",
1400
+ "echarts.label.position.funnel.bottom": "Bottom",
1401
+ "echarts.meta.chartOption": "Chart option",
1402
+ "echarts.meta.dataSource": "Data source",
1403
+ "echarts.meta.categoryField": "Category field",
1404
+ "echarts.meta.valueFields": "Value fields",
1405
+ "echarts.meta.seriesField": "Series split field",
1406
+ "echarts.meta.bubbleSize": "Bubble size",
1407
+ "echarts.notes.bar": "Bar chart: category + multiple value fields, one series per field; write the $data placeholder in series[].data; fixed height, autoHeight is forbidden",
1408
+ "echarts.notes.barH": "Horizontal bar: xAxis is the value axis, yAxis is the category axis; write the $data placeholder in yAxis.data for categories",
1409
+ "echarts.notes.line": "Line chart: category + multiple value fields; do not write areaStyle",
1410
+ "echarts.notes.area": "Area chart: line + series[].areaStyle; otherwise same as the line chart",
1411
+ "echarts.notes.pie": "Pie chart: category + the first value field produce { name, value }; only one value field is needed",
1412
+ "echarts.notes.doughnut": "Doughnut: pie + radius:[inner, outer]; the inner radius is configured in the panel",
1413
+ "echarts.notes.scatter": "Scatter: the category field is x, the first value field is y; when chartBubble is on, the second value field is the point size",
1414
+ "echarts.notes.radar": "Radar: each value field is a dimension (radar.indicator), each data row is a series (the category field is the series name); the radius is written by the panel to radar.radius (%, default 75)",
1415
+ "echarts.notes.funnel": "Funnel: category + the first value field, sorted descending; the four insets are written by the panel to series.left/right/top/bottom (%, reserve room on the right for outer labels)",
1416
+ "echarts.notes.gauge": "Gauge: the first value field of the first data row is the pointer value; min/max are written by the panel to series[0].min/max"
1417
+ }
1418
+ };
1419
+
1420
+ // src/i18n/th-TH.json
1421
+ var th_TH_default = {
1422
+ echarts: {
1423
+ "echarts.panel.chart": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
1424
+ "echarts.panel.config": "\u0E01\u0E32\u0E23\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E04\u0E48\u0E32",
1425
+ "echarts.panel.dataSource": "\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1426
+ "echarts.panel.category": "\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48",
1427
+ "echarts.panel.value": "\u0E04\u0E48\u0E32",
1428
+ "echarts.panel.series": "\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1429
+ "echarts.panel.chartType.bar": "\u0E41\u0E17\u0E48\u0E07",
1430
+ "echarts.panel.chartType.barH": "\u0E41\u0E17\u0E48\u0E07\u0E41\u0E19\u0E27\u0E19\u0E2D\u0E19",
1431
+ "echarts.panel.chartType.line": "\u0E40\u0E2A\u0E49\u0E19",
1432
+ "echarts.panel.chartType.area": "\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48",
1433
+ "echarts.panel.chartType.pie": "\u0E27\u0E07\u0E01\u0E25\u0E21",
1434
+ "echarts.panel.chartType.doughnut": "\u0E27\u0E07\u0E01\u0E25\u0E21\u0E27\u0E07\u0E41\u0E2B\u0E27\u0E19",
1435
+ "echarts.panel.chartType.scatter": "\u0E08\u0E38\u0E14\u0E01\u0E23\u0E30\u0E08\u0E32\u0E22",
1436
+ "echarts.panel.chartType.radar": "\u0E40\u0E23\u0E14\u0E32\u0E23\u0E4C",
1437
+ "echarts.panel.chartType.funnel": "\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07",
1438
+ "echarts.panel.chartType.gauge": "\u0E40\u0E01\u0E08\u0E27\u0E31\u0E14",
1439
+ "echarts.panel.dataLabel": "\u0E1B\u0E49\u0E32\u0E22\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1440
+ "echarts.panel.valueLabel": "\u0E1B\u0E49\u0E32\u0E22\u0E04\u0E48\u0E32",
1441
+ "echarts.panel.hint.dataBinding": "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E16\u0E39\u0E01\u0E41\u0E17\u0E23\u0E01\u0E15\u0E2D\u0E19\u0E1C\u0E39\u0E01\u0E40\u0E17\u0E21\u0E40\u0E1E\u0E25\u0E15; \u0E04\u0E07\u0E15\u0E31\u0E27\u0E41\u0E17\u0E19 `$data` \u0E44\u0E27\u0E49\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25 series/xAxis; \u0E2A\u0E32\u0E21\u0E32\u0E23\u0E16\u0E40\u0E02\u0E35\u0E22\u0E19\u0E2A\u0E44\u0E15\u0E25\u0E4C\u0E02\u0E31\u0E49\u0E19\u0E2A\u0E39\u0E07\u0E43\u0E19 chartOption \u0E02\u0E2D\u0E07 JSON \u0E40\u0E17\u0E21\u0E40\u0E1E\u0E25\u0E15\u0E44\u0E14\u0E49",
1442
+ "echarts.panel.field.dimension": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E21\u0E34\u0E15\u0E34 (\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E15\u0E48\u0E2D\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E21\u0E34\u0E15\u0E34)",
1443
+ "echarts.panel.field.value": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32",
1444
+ "echarts.panel.field.valueMulti": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32 (\u0E2B\u0E25\u0E32\u0E22\u0E04\u0E48\u0E32 \u0E2B\u0E25\u0E32\u0E22\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25)",
1445
+ "echarts.panel.default": "(\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19)",
1446
+ "echarts.panel.current": "(\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19)",
1447
+ "echarts.panel.defaultFirstArray": "(\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19: \u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C\u0E23\u0E30\u0E14\u0E31\u0E1A\u0E1A\u0E19\u0E15\u0E31\u0E27\u0E41\u0E23\u0E01)",
1448
+ "echarts.panel.error.invalidOption": "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E32\u0E14\u0E27\u0E48\u0E32\u0E40\u0E1B\u0E47\u0E19\u0E2D\u0E47\u0E2D\u0E1A\u0E40\u0E08\u0E01\u0E15\u0E4C",
1449
+ "echarts.panel.chartFallback": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
1450
+ "echarts.panel.optionDefault": "(\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19)",
1451
+ "echarts.panel.overflow.default": "\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
1452
+ "echarts.panel.overflow.none": "\u0E44\u0E21\u0E48\u0E21\u0E35 (\u0E41\u0E2A\u0E14\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14)",
1453
+ "echarts.panel.overflow.truncate": "\u0E15\u0E31\u0E14\u0E17\u0E34\u0E49\u0E07",
1454
+ "echarts.panel.overflow.break": "\u0E15\u0E31\u0E14\u0E04\u0E33",
1455
+ "echarts.panel.fontWeight.default": "\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
1456
+ "echarts.panel.fontWeight.normal": "\u0E1B\u0E01\u0E15\u0E34",
1457
+ "echarts.panel.fontWeight.bold": "\u0E2B\u0E19\u0E32",
1458
+ "echarts.panel.label.distance": "\u0E23\u0E30\u0E22\u0E30\u0E2B\u0E48\u0E32\u0E07",
1459
+ "echarts.panel.label.rotate": "\u0E01\u0E32\u0E23\u0E2B\u0E21\u0E38\u0E19 (\u0E2D\u0E07\u0E28\u0E32)",
1460
+ "echarts.panel.label.fontSize": "\u0E02\u0E19\u0E32\u0E14\u0E1F\u0E2D\u0E19\u0E15\u0E4C",
1461
+ "echarts.panel.label.fontWeight": "\u0E19\u0E49\u0E33\u0E2B\u0E19\u0E31\u0E01\u0E1F\u0E2D\u0E19\u0E15\u0E4C",
1462
+ "echarts.panel.label.color": "\u0E2A\u0E35\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21",
1463
+ "echarts.panel.label.backgroundColor": "\u0E2A\u0E35\u0E1E\u0E37\u0E49\u0E19\u0E2B\u0E25\u0E31\u0E07",
1464
+ "echarts.panel.label.borderColor": "\u0E2A\u0E35\u0E40\u0E2A\u0E49\u0E19\u0E02\u0E2D\u0E1A",
1465
+ "echarts.panel.label.borderWidth": "\u0E04\u0E27\u0E32\u0E21\u0E01\u0E27\u0E49\u0E32\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E02\u0E2D\u0E1A",
1466
+ "echarts.panel.label.borderRadius": "\u0E23\u0E31\u0E28\u0E21\u0E35",
1467
+ "echarts.panel.label.padding": "\u0E23\u0E30\u0E22\u0E30\u0E20\u0E32\u0E22\u0E43\u0E19",
1468
+ "echarts.panel.label.show": "\u0E41\u0E2A\u0E14\u0E07\u0E1B\u0E49\u0E32\u0E22\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1469
+ "echarts.panel.label.content": "\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32",
1470
+ "echarts.panel.label.formatterTitle": "\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E1B\u0E49\u0E32\u0E22\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1471
+ "echarts.panel.label.formatterCustom": "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07 / \u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
1472
+ "echarts.panel.label.formatterPlaceholder": "\u0E40\u0E0A\u0E48\u0E19 {b}: {c}",
1473
+ "echarts.panel.label.overflow": "\u0E25\u0E49\u0E19",
1474
+ "echarts.panel.label.position": "\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07",
1475
+ "echarts.panel.label.positionTitle": "\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E1B\u0E49\u0E32\u0E22",
1476
+ "echarts.panel.label.positionDefault": "\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
1477
+ "echarts.panel.label.offset": "\u0E2D\u0E2D\u0E1F\u0E40\u0E0B\u0E47\u0E15 X / Y",
1478
+ "echarts.panel.label.style": "\u0E2A\u0E44\u0E15\u0E25\u0E4C",
1479
+ "echarts.panel.labelLine.fontWeight": "\u0E19\u0E49\u0E33\u0E2B\u0E19\u0E31\u0E01\u0E1F\u0E2D\u0E19\u0E15\u0E4C",
1480
+ "echarts.panel.labelLine": "\u0E40\u0E2A\u0E49\u0E19\u0E1B\u0E49\u0E32\u0E22",
1481
+ "echarts.panel.labelLine.show": "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E1B\u0E49\u0E32\u0E22",
1482
+ "echarts.panel.labelLine.length": "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E40\u0E2A\u0E49\u0E19\u0E1B\u0E49\u0E32\u0E22",
1483
+ "echarts.panel.labelLine.length2": "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E17\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E2D\u0E07",
1484
+ "echarts.panel.labelLine.smooth": "\u0E40\u0E2A\u0E49\u0E19\u0E1B\u0E49\u0E32\u0E22\u0E42\u0E04\u0E49\u0E07",
1485
+ "echarts.panel.dataSourceTitle": "\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1486
+ "echarts.panel.categoryField": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48",
1487
+ "echarts.panel.removeField": "\u0E25\u0E1A\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E19\u0E35\u0E49",
1488
+ "echarts.panel.addField": "+ \u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1F\u0E34\u0E25\u0E14\u0E4C",
1489
+ "echarts.panel.seriesField": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E41\u0E22\u0E01\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1490
+ "echarts.panel.seriesFieldHint": "\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A \u0E40\u0E0A\u0E48\u0E19 region (\u0E41\u0E22\u0E01\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E15\u0E32\u0E21\u0E04\u0E48\u0E32)",
1491
+ "echarts.panel.bubbleSize": "\u0E02\u0E19\u0E32\u0E14\u0E1F\u0E2D\u0E07",
1492
+ "echarts.panel.title": "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
1493
+ "echarts.panel.titleHint": "\u0E40\u0E27\u0E49\u0E19\u0E27\u0E48\u0E32\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E0B\u0E48\u0E2D\u0E19\u0E0A\u0E37\u0E48\u0E2D",
1494
+ "echarts.panel.legend": "\u0E41\u0E2A\u0E14\u0E07\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22",
1495
+ "echarts.panel.palette": "\u0E0A\u0E38\u0E14\u0E2A\u0E35",
1496
+ "echarts.palette.default": "\u0E2A\u0E35\u0E19\u0E49\u0E33\u0E40\u0E07\u0E34\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
1497
+ "echarts.palette.fresh": "\u0E2A\u0E35\u0E40\u0E02\u0E35\u0E22\u0E27\u0E2A\u0E14\u0E0A\u0E37\u0E48\u0E19",
1498
+ "echarts.palette.warm": "\u0E2A\u0E35\u0E2A\u0E49\u0E21\u0E41\u0E14\u0E07\u0E2D\u0E1A\u0E2D\u0E38\u0E48\u0E19",
1499
+ "echarts.palette.purple": "\u0E2A\u0E35\u0E21\u0E39\u0E1F\u0E40\u0E17\u0E32",
1500
+ "echarts.panel.stack": "\u0E0B\u0E49\u0E2D\u0E19\u0E01\u0E31\u0E19",
1501
+ "echarts.panel.innerRadius": "\u0E23\u0E31\u0E28\u0E21\u0E35\u0E43\u0E19 (%)",
1502
+ "echarts.panel.paddingTRBL": "\u0E23\u0E30\u0E22\u0E30\u0E1A\u0E19/\u0E02\u0E27\u0E32/\u0E25\u0E48\u0E32\u0E07/\u0E0B\u0E49\u0E32\u0E22 (%)",
1503
+ "echarts.panel.paddingTop": "\u0E23\u0E30\u0E22\u0E30\u0E1A\u0E19",
1504
+ "echarts.panel.paddingRight": "\u0E23\u0E30\u0E22\u0E30\u0E02\u0E27\u0E32 (\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1B\u0E49\u0E32\u0E22\u0E14\u0E49\u0E32\u0E19\u0E19\u0E2D\u0E01)",
1505
+ "echarts.panel.paddingBottom": "\u0E23\u0E30\u0E22\u0E30\u0E25\u0E48\u0E32\u0E07",
1506
+ "echarts.panel.paddingLeft": "\u0E23\u0E30\u0E22\u0E30\u0E0B\u0E49\u0E32\u0E22",
1507
+ "echarts.panel.radius": "\u0E23\u0E31\u0E28\u0E21\u0E35 (%)",
1508
+ "echarts.panel.minMax": "\u0E15\u0E48\u0E33\u0E2A\u0E38\u0E14 / \u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14",
1509
+ "echarts.panel.group": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
1510
+ "echarts.series.typeNames.bar": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E41\u0E17\u0E48\u0E07",
1511
+ "echarts.series.typeNames.barH": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E41\u0E17\u0E48\u0E07\u0E41\u0E19\u0E27\u0E19\u0E2D\u0E19",
1512
+ "echarts.series.typeNames.line": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E2A\u0E49\u0E19",
1513
+ "echarts.series.typeNames.area": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48",
1514
+ "echarts.series.typeNames.pie": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E27\u0E07\u0E01\u0E25\u0E21",
1515
+ "echarts.series.typeNames.doughnut": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E27\u0E07\u0E01\u0E25\u0E21\u0E27\u0E07\u0E41\u0E2B\u0E27\u0E19",
1516
+ "echarts.series.typeNames.scatter": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E01\u0E23\u0E30\u0E08\u0E32\u0E22",
1517
+ "echarts.series.typeNames.radar": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E23\u0E14\u0E32\u0E23\u0E4C",
1518
+ "echarts.series.typeNames.funnel": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07",
1519
+ "echarts.series.typeNames.gauge": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E01\u0E08\u0E27\u0E31\u0E14",
1520
+ "echarts.label.formatter.value": "\u0E04\u0E48\u0E32",
1521
+ "echarts.label.formatter.nameValue": "\u0E0A\u0E37\u0E48\u0E2D: \u0E04\u0E48\u0E32",
1522
+ "echarts.label.formatter.name": "\u0E0A\u0E37\u0E48\u0E2D",
1523
+ "echarts.label.formatter.percent": "\u0E40\u0E1B\u0E2D\u0E23\u0E4C\u0E40\u0E0B\u0E47\u0E19\u0E15\u0E4C",
1524
+ "echarts.label.position.bar.top": "\u0E1A\u0E19",
1525
+ "echarts.label.position.bar.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
1526
+ "echarts.label.position.bar.insideTop": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19\u0E1A\u0E19",
1527
+ "echarts.label.position.bar.bottom": "\u0E25\u0E48\u0E32\u0E07",
1528
+ "echarts.label.position.bar.insideBottom": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19\u0E25\u0E48\u0E32\u0E07",
1529
+ "echarts.label.position.bar.right": "\u0E02\u0E27\u0E32",
1530
+ "echarts.label.position.bar.left": "\u0E0B\u0E49\u0E32\u0E22",
1531
+ "echarts.label.position.bar.middle": "\u0E01\u0E25\u0E32\u0E07",
1532
+ "echarts.label.position.line.top": "\u0E1A\u0E19",
1533
+ "echarts.label.position.line.bottom": "\u0E25\u0E48\u0E32\u0E07",
1534
+ "echarts.label.position.line.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
1535
+ "echarts.label.position.line.left": "\u0E0B\u0E49\u0E32\u0E22",
1536
+ "echarts.label.position.line.right": "\u0E02\u0E27\u0E32",
1537
+ "echarts.label.position.pie.outside": "\u0E14\u0E49\u0E32\u0E19\u0E19\u0E2D\u0E01",
1538
+ "echarts.label.position.pie.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
1539
+ "echarts.label.position.pie.center": "\u0E01\u0E25\u0E32\u0E07",
1540
+ "echarts.label.position.scatter.top": "\u0E1A\u0E19",
1541
+ "echarts.label.position.scatter.bottom": "\u0E25\u0E48\u0E32\u0E07",
1542
+ "echarts.label.position.scatter.left": "\u0E0B\u0E49\u0E32\u0E22",
1543
+ "echarts.label.position.scatter.right": "\u0E02\u0E27\u0E32",
1544
+ "echarts.label.position.scatter.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
1545
+ "echarts.label.position.radar.top": "\u0E1A\u0E19",
1546
+ "echarts.label.position.radar.bottom": "\u0E25\u0E48\u0E32\u0E07",
1547
+ "echarts.label.position.radar.left": "\u0E0B\u0E49\u0E32\u0E22",
1548
+ "echarts.label.position.radar.right": "\u0E02\u0E27\u0E32",
1549
+ "echarts.label.position.radar.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
1550
+ "echarts.label.position.funnel.outer": "\u0E14\u0E49\u0E32\u0E19\u0E19\u0E2D\u0E01",
1551
+ "echarts.label.position.funnel.inner": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
1552
+ "echarts.label.position.funnel.left": "\u0E0B\u0E49\u0E32\u0E22",
1553
+ "echarts.label.position.funnel.right": "\u0E02\u0E27\u0E32",
1554
+ "echarts.label.position.funnel.top": "\u0E1A\u0E19",
1555
+ "echarts.label.position.funnel.bottom": "\u0E25\u0E48\u0E32\u0E07",
1556
+ "echarts.meta.chartOption": "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
1557
+ "echarts.meta.dataSource": "\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1558
+ "echarts.meta.categoryField": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48",
1559
+ "echarts.meta.valueFields": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32",
1560
+ "echarts.meta.seriesField": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E41\u0E22\u0E01\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
1561
+ "echarts.meta.bubbleSize": "\u0E02\u0E19\u0E32\u0E14\u0E1F\u0E2D\u0E07",
1562
+ "echarts.notes.bar": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E41\u0E17\u0E48\u0E07: \u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48 + \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32\u0E2B\u0E25\u0E32\u0E22\u0E15\u0E31\u0E27 \u0E2B\u0E19\u0E36\u0E48\u0E07\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E15\u0E48\u0E2D\u0E2B\u0E19\u0E36\u0E48\u0E07 series; \u0E40\u0E02\u0E35\u0E22\u0E19\u0E15\u0E31\u0E27\u0E41\u0E17\u0E19 $data \u0E43\u0E19 series[].data; \u0E04\u0E27\u0E32\u0E21\u0E2A\u0E39\u0E07\u0E04\u0E07\u0E17\u0E35\u0E48 \u0E2B\u0E49\u0E32\u0E21\u0E43\u0E0A\u0E49 autoHeight",
1563
+ "echarts.notes.barH": "\u0E41\u0E17\u0E48\u0E07\u0E41\u0E19\u0E27\u0E19\u0E2D\u0E19: xAxis \u0E40\u0E1B\u0E47\u0E19\u0E41\u0E01\u0E19\u0E04\u0E48\u0E32 yAxis \u0E40\u0E1B\u0E47\u0E19\u0E41\u0E01\u0E19\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48; \u0E40\u0E02\u0E35\u0E22\u0E19\u0E15\u0E31\u0E27\u0E41\u0E17\u0E19 $data \u0E43\u0E19 yAxis.data \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48",
1564
+ "echarts.notes.line": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E2A\u0E49\u0E19: \u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48 + \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32\u0E2B\u0E25\u0E32\u0E22\u0E15\u0E31\u0E27; \u0E44\u0E21\u0E48\u0E40\u0E02\u0E35\u0E22\u0E19 areaStyle",
1565
+ "echarts.notes.area": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48: \u0E40\u0E2A\u0E49\u0E19 + series[].areaStyle; \u0E19\u0E2D\u0E01\u0E19\u0E31\u0E49\u0E19\u0E40\u0E2B\u0E21\u0E37\u0E2D\u0E19\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E2A\u0E49\u0E19",
1566
+ "echarts.notes.pie": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E27\u0E07\u0E01\u0E25\u0E21: \u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48 + \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32\u0E15\u0E31\u0E27\u0E41\u0E23\u0E01\u0E2A\u0E23\u0E49\u0E32\u0E07 { name, value }; \u0E15\u0E49\u0E2D\u0E07\u0E01\u0E32\u0E23\u0E40\u0E1E\u0E35\u0E22\u0E07\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32",
1567
+ "echarts.notes.doughnut": "\u0E27\u0E07\u0E01\u0E25\u0E21\u0E27\u0E07\u0E41\u0E2B\u0E27\u0E19: \u0E27\u0E07\u0E01\u0E25\u0E21 + radius:[\u0E23\u0E31\u0E28\u0E21\u0E35\u0E43\u0E19, \u0E23\u0E31\u0E28\u0E21\u0E35\u0E19\u0E2D\u0E01]; \u0E23\u0E31\u0E28\u0E21\u0E35\u0E43\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E43\u0E19\u0E41\u0E1C\u0E07",
1568
+ "echarts.notes.scatter": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E01\u0E23\u0E30\u0E08\u0E32\u0E22: \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48\u0E40\u0E1B\u0E47\u0E19 x \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32\u0E15\u0E31\u0E27\u0E41\u0E23\u0E01\u0E40\u0E1B\u0E47\u0E19 y; \u0E40\u0E21\u0E37\u0E48\u0E2D\u0E40\u0E1B\u0E34\u0E14 chartBubble \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32\u0E15\u0E31\u0E27\u0E17\u0E35\u0E48\u0E2A\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E02\u0E19\u0E32\u0E14\u0E08\u0E38\u0E14",
1569
+ "echarts.notes.radar": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E23\u0E14\u0E32\u0E23\u0E4C: \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32\u0E17\u0E38\u0E01\u0E15\u0E31\u0E27\u0E04\u0E37\u0E2D\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E21\u0E34\u0E15\u0E34 (radar.indicator) \u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E41\u0E15\u0E48\u0E25\u0E30\u0E41\u0E16\u0E27\u0E04\u0E37\u0E2D\u0E2B\u0E19\u0E36\u0E48\u0E07 series (\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48\u0E40\u0E1B\u0E47\u0E19\u0E0A\u0E37\u0E48\u0E2D series); \u0E23\u0E31\u0E28\u0E21\u0E35\u0E40\u0E02\u0E35\u0E22\u0E19\u0E42\u0E14\u0E22\u0E41\u0E1C\u0E07\u0E44\u0E1B\u0E17\u0E35\u0E48 radar.radius (%, \u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19 75)",
1570
+ "echarts.notes.funnel": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07: \u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48 + \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32\u0E15\u0E31\u0E27\u0E41\u0E23\u0E01 \u0E40\u0E23\u0E35\u0E22\u0E07\u0E15\u0E32\u0E21\u0E04\u0E48\u0E32\u0E25\u0E07\u0E21\u0E32; \u0E23\u0E30\u0E22\u0E30\u0E20\u0E32\u0E22\u0E43\u0E19\u0E2A\u0E35\u0E48\u0E14\u0E49\u0E32\u0E19\u0E40\u0E02\u0E35\u0E22\u0E19\u0E42\u0E14\u0E22\u0E41\u0E1C\u0E07\u0E44\u0E1B\u0E17\u0E35\u0E48 series.left/right/top/bottom (%, \u0E40\u0E1C\u0E37\u0E48\u0E2D\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48\u0E14\u0E49\u0E32\u0E19\u0E02\u0E27\u0E32\u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A\u0E1B\u0E49\u0E32\u0E22\u0E14\u0E49\u0E32\u0E19\u0E19\u0E2D\u0E01)",
1571
+ "echarts.notes.gauge": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E01\u0E08\u0E27\u0E31\u0E14: \u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32\u0E15\u0E31\u0E27\u0E41\u0E23\u0E01\u0E02\u0E2D\u0E07\u0E41\u0E16\u0E27\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E41\u0E23\u0E01\u0E40\u0E1B\u0E47\u0E19\u0E04\u0E48\u0E32\u0E1C\u0E25\u0E31\u0E01\u0E14\u0E31\u0E19; min/max \u0E40\u0E02\u0E35\u0E22\u0E19\u0E42\u0E14\u0E22\u0E41\u0E1C\u0E07\u0E44\u0E1B\u0E17\u0E35\u0E48 series[0].min/max"
1572
+ }
1573
+ };
1574
+
641
1575
  // src/ui.ts
642
1576
  import { defineElementUI, registerElementUI } from "@worm-print-platform/plugin-kit";
643
- import {
644
- asObject,
645
- CHART_KINDS as CHART_KINDS2,
646
- cloneChartOption,
647
- createDefaultChartOption as createDefaultChartOption2,
648
- FUNNEL_PADDING_DEFAULTS as FUNNEL_PADDING_DEFAULTS2,
649
- getChartKindDefinition as getChartKindDefinition2,
650
- getChartPalettes as getChartPalettes2,
651
- normalizeChartOption as normalizeChartOption2,
652
- previewChartOption,
653
- RADAR_RADIUS_DEFAULT as RADAR_RADIUS_DEFAULT2,
654
- readFunnelPadding,
655
- readPaletteKey,
656
- readRadarRadius,
657
- renderChartToSvg as renderChartToSvg2,
658
- resolveChartPanelFields as resolveChartPanelFields2,
659
- syncSeriesCount,
660
- writeFunnelPadding,
661
- writeRadarRadius
662
- } from "@worm-print-platform/echarts/kit";
1577
+ import { render } from "@worm-print-platform/plugin-kit/dom";
1578
+ import { colorPicker } from "@worm-print-platform/plugin-kit/controls";
1579
+ var activeT = globalT;
1580
+ var t2 = (key, params) => activeT(key, params);
1581
+ function withTranslator(translator, render2) {
1582
+ const prev = activeT;
1583
+ activeT = translator ?? globalT;
1584
+ try {
1585
+ return render2();
1586
+ } finally {
1587
+ activeT = prev;
1588
+ }
1589
+ }
663
1590
  var CANVAS_STYLE = "width:100%;height:100%;min-width:0;min-height:0;pointer-events:none";
664
1591
  var STYLES = [
665
1592
  ".echarts-canvas-element{overflow:hidden}",
666
1593
  ".echarts-field-row{display:flex;gap:6px;align-items:center}",
667
1594
  ".echarts-field-row>.pd-input{flex:1;min-width:0}",
668
- ".echarts-field-row>.pd-button{flex:none}"
1595
+ ".echarts-field-row>.pd-button{flex:none}",
1596
+ ".echarts-dropdown-trigger{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;height:26px;min-height:26px;padding:3px 6px;border:1px solid var(--pd-border,#d9dde6);border-radius:6px;background:var(--pd-input-bg,#fff);color:inherit;font:inherit;box-sizing:border-box;cursor:pointer;text-align:left}",
1597
+ ".echarts-dropdown-trigger:hover{border-color:var(--pd-text-faint,#b4b9c4)}",
1598
+ '.echarts-dropdown-trigger[aria-expanded="true"]{border-color:var(--pd-accent,#165dff);box-shadow:0 0 0 2px rgb(22 93 255 / 12%)}',
1599
+ ".echarts-dropdown-value{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}",
1600
+ ".echarts-dropdown-arrow{flex:none;color:var(--pd-text-muted,#909399);font-size:10px;transition:transform .14s}",
1601
+ '.echarts-dropdown-trigger[aria-expanded="true"] .echarts-dropdown-arrow{transform:rotate(180deg)}',
1602
+ ".echarts-dropdown-panel{position:fixed;z-index:1200;max-height:240px;overflow:auto;padding:3px;border:1px solid var(--pd-border,#d9dde6);border-radius:6px;background:var(--pd-input-bg,#fff);box-shadow:0 6px 18px rgb(0 0 0 / 14%);box-sizing:border-box}",
1603
+ ".echarts-dropdown-option{padding:5px 8px;border-radius:4px;cursor:pointer;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}",
1604
+ ".echarts-dropdown-option:hover{background:var(--pd-accent-soft,rgb(22 93 255 / 9%))}",
1605
+ ".echarts-dropdown-option.is-active{background:var(--pd-accent-soft,rgb(22 93 255 / 9%));color:var(--pd-accent,#165dff)}",
1606
+ ".echarts-label-group{margin-top:8px;border-top:1px solid var(--pd-border,#e5e7eb);padding-top:8px}",
1607
+ ".echarts-label-group>summary{display:flex;align-items:center;cursor:pointer;list-style:none;font-size:12px;font-weight:600}",
1608
+ ".echarts-label-summary>.pd-field{flex:1;margin:0;font-weight:400}",
1609
+ ".echarts-label-sub{font-size:11px;color:var(--pd-text-secondary,#6b7280);margin:8px 0 4px}"
669
1610
  ].join("");
670
1611
  var CHART_OPTION_KEYS = [
671
1612
  "chartOption",
@@ -693,10 +1634,12 @@ var SEARCH_KEYWORDS = [
693
1634
  "\u6563\u70B9",
694
1635
  "\u96F7\u8FBE",
695
1636
  "\u6F0F\u6597",
696
- "\u4EEA\u8868"
1637
+ "\u4EEA\u8868",
1638
+ "\u6570\u636E\u6807\u7B7E",
1639
+ "\u6570\u503C\u6807\u7B7E",
1640
+ "label"
697
1641
  ];
698
- var PANEL_HINT = "\u6570\u636E\u7531\u6A21\u677F\u7ED1\u5B9A\u9636\u6BB5\u6CE8\u5165\uFF1Aseries/xAxis \u7684 data \u4FDD\u7559 `$data` \u5360\u4F4D\u5373\u53EF\uFF1B\u590D\u6742\u6837\u5F0F\u53EF\u5728\u6A21\u677F JSON \u4E2D\u624B\u5199 chartOption\u3002";
699
- var datalistSeq = 0;
1642
+ var panelHint = () => t2("echarts.panel.hint.dataBinding");
700
1643
  function escapeHtml2(value) {
701
1644
  return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
702
1645
  }
@@ -709,7 +1652,7 @@ function rawChartOption(element) {
709
1652
  }
710
1653
  function panelOption(element) {
711
1654
  const raw = rawChartOption(element);
712
- return cloneChartOption(raw ?? createDefaultChartOption2(elementType(element)));
1655
+ return cloneChartOption(raw ?? createDefaultChartOption(elementType(element)));
713
1656
  }
714
1657
  function chartHasProperties(element) {
715
1658
  const options = element?.options;
@@ -718,7 +1661,7 @@ function chartHasProperties(element) {
718
1661
  return CHART_OPTION_KEYS.some((key) => record[key] !== void 0);
719
1662
  }
720
1663
  function commitOption(ctx, type, next, patch = {}) {
721
- ctx.update({ chartOption: normalizeChartOption2(type, next), ...patch });
1664
+ ctx.update({ chartOption: normalizeChartOption(type, next), ...patch });
722
1665
  }
723
1666
  function readValueFields(element) {
724
1667
  const raw = element.options.chartValueFields;
@@ -737,18 +1680,45 @@ function maxValueFields(def) {
737
1680
  }
738
1681
  }
739
1682
  function valueFieldsLabel(def, limit) {
740
- if (def?.seriesType === "radar") return "\u7EF4\u5EA6\u5B57\u6BB5\uFF08\u6BCF\u4E2A\u5B57\u6BB5\u4E00\u4E2A\u7EF4\u5EA6\uFF09";
741
- return limit === 1 ? "\u6570\u503C\u5B57\u6BB5" : "\u6570\u503C\u5B57\u6BB5\uFF08\u591A\u503C\u591A\u7CFB\u5217\uFF09";
1683
+ if (def?.seriesType === "radar") return t2("echarts.panel.field.dimension");
1684
+ return limit === 1 ? t2("echarts.panel.field.value") : t2("echarts.panel.field.valueMulti");
742
1685
  }
743
1686
  function dataSourceCandidates(data) {
744
1687
  const first = data?.[0];
745
1688
  if (!first) return [];
746
1689
  return Object.keys(first).filter((key) => Array.isArray(first[key]));
747
1690
  }
1691
+ function dataRowFields(data, dataSource) {
1692
+ const first = data?.[0];
1693
+ if (!first) return [];
1694
+ const key = dataSource && Array.isArray(first[dataSource]) ? dataSource : Object.keys(first).find((k) => Array.isArray(first[k]));
1695
+ if (!key) return [];
1696
+ const rows = first[key];
1697
+ return rows.length > 0 && typeof rows[0] === "object" && rows[0] !== null ? Object.keys(rows[0]) : [];
1698
+ }
1699
+ function fieldLabelMap(fields) {
1700
+ const map = /* @__PURE__ */ new Map();
1701
+ for (const field2 of fields ?? []) {
1702
+ if (field2.fieldKey && field2.fieldLabel) map.set(field2.fieldKey, field2.fieldLabel);
1703
+ }
1704
+ return map;
1705
+ }
1706
+ function optionLabel(value, labels, fallbackSuffix) {
1707
+ if (!value) return fallbackSuffix ?? t2("echarts.panel.default");
1708
+ const name = labels.get(value);
1709
+ const base = name ? `${name}\uFF08${value}\uFF09` : value;
1710
+ return fallbackSuffix ? `${base}${fallbackSuffix}` : base;
1711
+ }
1712
+ function dropdownOptions(candidates, current, labels = /* @__PURE__ */ new Map()) {
1713
+ const opts = candidates.map((value) => ({ value, label: optionLabel(value, labels) }));
1714
+ if (current && !candidates.includes(current)) opts.unshift({ value: current, label: optionLabel(current, labels, t2("echarts.panel.current")) });
1715
+ if (!current) opts.unshift({ value: "", label: t2("echarts.panel.defaultFirstArray") });
1716
+ return opts;
1717
+ }
748
1718
  function seriesList(option) {
749
1719
  return Array.isArray(option.series) ? option.series : [];
750
1720
  }
751
- function clamp(value, min, max) {
1721
+ function clamp2(value, min, max) {
752
1722
  return Math.min(max, Math.max(min, value));
753
1723
  }
754
1724
  function syncValueFields(ctx, type, nextFields) {
@@ -767,14 +1737,14 @@ function renderCanvas(ctx) {
767
1737
  const widthMm = Number(options.width) || 0;
768
1738
  const heightMm = Number(options.height) || 0;
769
1739
  try {
770
- const preview = previewChartOption(type, rawChartOption(element) ?? createDefaultChartOption2(type));
771
- const option = normalizeChartOption2(type, preview);
772
- if (!option || typeof option !== "object" || Array.isArray(option)) throw new Error("\u56FE\u8868 option \u975E\u6CD5\uFF1A\u9700\u8981\u5BF9\u8C61");
1740
+ const preview = previewChartOption(type, rawChartOption(element) ?? createDefaultChartOption(type));
1741
+ const option = normalizeChartOption(type, preview);
1742
+ if (!option || typeof option !== "object" || Array.isArray(option)) throw new Error(t2("echarts.panel.error.invalidOption"));
773
1743
  const fontFamily = typeof options.fontFamily === "string" && options.fontFamily ? options.fontFamily : void 0;
774
- const svg = renderChartToSvg2({ key: element.id, type, option, widthMm, heightMm, fontFamily });
1744
+ const svg = renderChartToSvg({ key: element.id, type, option, widthMm, heightMm, fontFamily });
775
1745
  return `<div class="echarts-canvas-element" style="${CANVAS_STYLE}">${svg}</div>`;
776
1746
  } catch {
777
- const title = typeof options.title === "string" && options.title.trim() ? options.title : getChartKindDefinition2(type)?.label ?? "\u56FE\u8868";
1747
+ const title = typeof options.title === "string" && options.title.trim() ? options.title : getChartKindDefinition(type)?.label ?? t2("echarts.panel.chartFallback");
778
1748
  return `<div class="echarts-canvas-element" style="${CANVAS_STYLE}">${escapeHtml2(title)}</div>`;
779
1749
  }
780
1750
  }
@@ -811,52 +1781,311 @@ function checkboxField(labelText, checked, onCommit) {
811
1781
  wrap.appendChild(input);
812
1782
  return wrap;
813
1783
  }
1784
+ function selectInput(options, value, onCommit) {
1785
+ const select = el("select", "pd-select");
1786
+ for (const item of options) {
1787
+ const optionEl = el("option");
1788
+ optionEl.value = item.value;
1789
+ optionEl.textContent = item.label;
1790
+ select.appendChild(optionEl);
1791
+ }
1792
+ select.value = value;
1793
+ select.addEventListener("change", () => onCommit(select.value));
1794
+ return select;
1795
+ }
1796
+ var activeDropdown = null;
1797
+ function composedPathOf(ev) {
1798
+ const composed = typeof ev.composedPath === "function" ? ev.composedPath() : [];
1799
+ return composed.length ? composed : [ev.target];
1800
+ }
1801
+ function dropdownSelect(options, value, onCommit) {
1802
+ const current = options.find((item) => item.value === value) ?? { value, label: value || t2("echarts.panel.optionDefault") };
1803
+ const trigger = el("button", "echarts-dropdown-trigger");
1804
+ trigger.type = "button";
1805
+ trigger.setAttribute("aria-haspopup", "listbox");
1806
+ trigger.setAttribute("aria-expanded", "false");
1807
+ const valueEl = el("span", "echarts-dropdown-value", current.label);
1808
+ const arrow = el("span", "echarts-dropdown-arrow", "\u25BE");
1809
+ trigger.appendChild(valueEl);
1810
+ trigger.appendChild(arrow);
1811
+ let panel = null;
1812
+ let off = [];
1813
+ const close = () => {
1814
+ off.forEach((fn) => fn());
1815
+ off = [];
1816
+ panel?.remove();
1817
+ panel = null;
1818
+ trigger.setAttribute("aria-expanded", "false");
1819
+ if (activeDropdown?.close === close) activeDropdown = null;
1820
+ };
1821
+ const open = () => {
1822
+ activeDropdown?.close();
1823
+ const root = trigger.getRootNode();
1824
+ const mount = root instanceof ShadowRoot ? root : document.body;
1825
+ panel = el("div", "echarts-dropdown-panel");
1826
+ panel.setAttribute("role", "listbox");
1827
+ for (const item of options) {
1828
+ const optionEl = el("div", `echarts-dropdown-option${item.value === value ? " is-active" : ""}`, item.label);
1829
+ optionEl.setAttribute("role", "option");
1830
+ optionEl.setAttribute("aria-selected", item.value === value ? "true" : "false");
1831
+ optionEl.addEventListener("click", (ev) => {
1832
+ ev.stopPropagation();
1833
+ close();
1834
+ onCommit(item.value);
1835
+ });
1836
+ panel.appendChild(optionEl);
1837
+ }
1838
+ mount.appendChild(panel);
1839
+ const rect = trigger.getBoundingClientRect();
1840
+ panel.style.left = `${rect.left}px`;
1841
+ panel.style.top = `${rect.bottom + 4}px`;
1842
+ panel.style.minWidth = `${rect.width}px`;
1843
+ trigger.setAttribute("aria-expanded", "true");
1844
+ activeDropdown = { close };
1845
+ const onPointerDown = (ev) => {
1846
+ const path = composedPathOf(ev);
1847
+ if (path.includes(trigger) || path.includes(panel)) return;
1848
+ close();
1849
+ };
1850
+ const onKeydown = (ev) => {
1851
+ if (ev.key === "Escape") close();
1852
+ };
1853
+ const onScroll = () => close();
1854
+ document.addEventListener("pointerdown", onPointerDown, true);
1855
+ document.addEventListener("keydown", onKeydown);
1856
+ window.addEventListener("scroll", onScroll, true);
1857
+ window.addEventListener("resize", onScroll);
1858
+ root.addEventListener("scroll", onScroll, true);
1859
+ off.push(
1860
+ () => document.removeEventListener("pointerdown", onPointerDown, true),
1861
+ () => document.removeEventListener("keydown", onKeydown),
1862
+ () => window.removeEventListener("scroll", onScroll, true),
1863
+ () => window.removeEventListener("resize", onScroll),
1864
+ () => root.removeEventListener("scroll", onScroll, true)
1865
+ );
1866
+ };
1867
+ trigger.addEventListener("click", (ev) => {
1868
+ ev.stopPropagation();
1869
+ if (panel) close();
1870
+ else open();
1871
+ });
1872
+ return trigger;
1873
+ }
1874
+ var overflowOptions = () => [
1875
+ { value: "", label: t2("echarts.panel.overflow.default") },
1876
+ { value: "none", label: t2("echarts.panel.overflow.none") },
1877
+ { value: "truncate", label: t2("echarts.panel.overflow.truncate") },
1878
+ { value: "break", label: t2("echarts.panel.overflow.break") }
1879
+ ];
1880
+ var fontWeightOptions = () => [
1881
+ { value: "", label: t2("echarts.panel.fontWeight.default") },
1882
+ { value: "normal", label: t2("echarts.panel.fontWeight.normal") },
1883
+ { value: "bold", label: t2("echarts.panel.fontWeight.bold") }
1884
+ ];
1885
+ var styleFieldLabels = () => ({
1886
+ distance: t2("echarts.panel.label.distance"),
1887
+ rotate: t2("echarts.panel.label.rotate"),
1888
+ fontSize: t2("echarts.panel.label.fontSize"),
1889
+ fontWeight: t2("echarts.panel.label.fontWeight"),
1890
+ color: t2("echarts.panel.label.color"),
1891
+ backgroundColor: t2("echarts.panel.label.backgroundColor"),
1892
+ borderColor: t2("echarts.panel.label.borderColor"),
1893
+ borderWidth: t2("echarts.panel.label.borderWidth"),
1894
+ borderRadius: t2("echarts.panel.label.borderRadius"),
1895
+ padding: t2("echarts.panel.label.padding")
1896
+ });
1897
+ function renderLabelGroup(ctx, type) {
1898
+ const element = ctx.element;
1899
+ const def = getChartKindDefinition(type);
1900
+ const fields = labelFieldsOf(type);
1901
+ const has = (key) => fields.includes(key);
1902
+ const state = readChartLabel(panelOption(element), type);
1903
+ const styleLabels = styleFieldLabels();
1904
+ const commit = (patch) => {
1905
+ commitOption(ctx, type, updateChartLabel(panelOption(element), type, patch));
1906
+ };
1907
+ const commitNumber = (key, raw) => {
1908
+ if (raw.trim() === "") return commit({ [key]: null });
1909
+ const value = Number(raw);
1910
+ if (!Number.isFinite(value)) return;
1911
+ commit({ [key]: value });
1912
+ };
1913
+ const commitLineNumber = (key, raw) => {
1914
+ if (raw.trim() === "") return commit({ labelLine: { [key]: null } });
1915
+ const value = Number(raw);
1916
+ if (!Number.isFinite(value)) return;
1917
+ commit({ labelLine: { [key]: value } });
1918
+ };
1919
+ const numberField = (key, value) => {
1920
+ const wrap = field(styleLabels[key] ?? key);
1921
+ wrap.appendChild(
1922
+ textInput({ value: value === void 0 ? "" : String(value), type: "number" }, (raw) => commitNumber(key, raw))
1923
+ );
1924
+ return wrap;
1925
+ };
1926
+ const colorField = (key, value) => {
1927
+ const wrap = field(styleLabels[key] ?? key);
1928
+ const holder = el("span");
1929
+ render(colorPicker({
1930
+ value: value ?? "",
1931
+ title: styleLabels[key] ?? key,
1932
+ // 面板点击时才构建,届时候选渲染期 translator 已还原,必须固化 ctx.t
1933
+ translator: ctx.t,
1934
+ onChange: (next) => commit({ [key]: next ?? "" })
1935
+ }), holder);
1936
+ wrap.appendChild(holder);
1937
+ return wrap;
1938
+ };
1939
+ const group = el("details", "echarts-label-group");
1940
+ group.open = state.show;
1941
+ const summary = el("summary", "echarts-label-summary");
1942
+ const toggle = checkboxField(t2("echarts.panel.label.show"), state.show, (checked) => commit({ enabled: checked }));
1943
+ toggle.querySelector("input")?.addEventListener("click", (event) => event.stopPropagation());
1944
+ summary.appendChild(toggle);
1945
+ group.appendChild(summary);
1946
+ if (has("formatter") || has("overflow")) {
1947
+ group.appendChild(el("div", "echarts-label-sub", t2("echarts.panel.label.content")));
1948
+ if (has("formatter")) {
1949
+ const wrap = field(t2("echarts.panel.label.formatterTitle"));
1950
+ wrap.appendChild(
1951
+ selectInput(
1952
+ [{ value: "", label: t2("echarts.panel.label.formatterCustom") }, ...LABEL_PRESETS.map((preset) => ({ value: preset.formatter, label: t2(preset.labelKey) }))],
1953
+ state.formatter ?? "",
1954
+ (value) => commit({ formatter: value })
1955
+ )
1956
+ );
1957
+ wrap.appendChild(
1958
+ textInput({ value: state.formatter ?? "", placeholder: t2("echarts.panel.label.formatterPlaceholder") }, (value) => commit({ formatter: value }))
1959
+ );
1960
+ group.appendChild(wrap);
1961
+ }
1962
+ if (has("overflow")) {
1963
+ const wrap = field(t2("echarts.panel.label.overflow"));
1964
+ wrap.appendChild(selectInput(overflowOptions(), state.overflow ?? "", (value) => commit({ overflow: value })));
1965
+ group.appendChild(wrap);
1966
+ }
1967
+ }
1968
+ if (has("position") || has("distance") || has("rotate") || has("offset")) {
1969
+ group.appendChild(el("div", "echarts-label-sub", t2("echarts.panel.label.position")));
1970
+ if (has("position")) {
1971
+ const wrap = field(t2("echarts.panel.label.positionTitle"));
1972
+ const positions = def ? LABEL_POSITIONS[def.seriesType] ?? [] : [];
1973
+ wrap.appendChild(
1974
+ selectInput([{ value: "", label: t2("echarts.panel.label.positionDefault") }, ...positions.map((p) => ({ value: p.value, label: t2(p.labelKey) }))], state.position ?? "", (value) => commit({ position: value }))
1975
+ );
1976
+ group.appendChild(wrap);
1977
+ }
1978
+ if (has("distance")) group.appendChild(numberField("distance", state.distance));
1979
+ if (has("rotate")) group.appendChild(numberField("rotate", state.rotate));
1980
+ if (has("offset")) {
1981
+ let commitOffset2 = function() {
1982
+ const parse = (input, fallback) => {
1983
+ const text = input.value.trim();
1984
+ if (text === "") return 0;
1985
+ const value = Number(text);
1986
+ return Number.isFinite(value) ? value : fallback;
1987
+ };
1988
+ commit({ offset: [parse(inputX, current[0] ?? 0), parse(inputY, current[1] ?? 0)] });
1989
+ };
1990
+ var commitOffset = commitOffset2;
1991
+ const wrap = field(t2("echarts.panel.label.offset"));
1992
+ const row = el("div", "echarts-field-row");
1993
+ const current = state.offset ?? [0, 0];
1994
+ const inputX = textInput({ value: String(current[0] ?? 0), type: "number" }, () => commitOffset2());
1995
+ const inputY = textInput({ value: String(current[1] ?? 0), type: "number" }, () => commitOffset2());
1996
+ row.appendChild(inputX);
1997
+ row.appendChild(inputY);
1998
+ wrap.appendChild(row);
1999
+ group.appendChild(wrap);
2000
+ }
2001
+ }
2002
+ const styleKeys = ["fontSize", "fontWeight", "color", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"];
2003
+ if (styleKeys.some(has)) {
2004
+ group.appendChild(el("div", "echarts-label-sub", t2("echarts.panel.label.style")));
2005
+ if (has("fontSize")) group.appendChild(numberField("fontSize", state.fontSize));
2006
+ if (has("fontWeight")) {
2007
+ const wrap = field(t2("echarts.panel.labelLine.fontWeight"));
2008
+ wrap.appendChild(selectInput(fontWeightOptions(), state.fontWeight ?? "", (value) => commit({ fontWeight: value })));
2009
+ group.appendChild(wrap);
2010
+ }
2011
+ for (const key of ["color", "backgroundColor", "borderColor"]) {
2012
+ if (has(key)) group.appendChild(colorField(key, state[key]));
2013
+ }
2014
+ for (const key of ["borderWidth", "borderRadius", "padding"]) {
2015
+ if (has(key)) group.appendChild(numberField(key, state[key]));
2016
+ }
2017
+ }
2018
+ if (has("labelLine.show")) {
2019
+ group.appendChild(el("div", "echarts-label-sub", t2("echarts.panel.labelLine")));
2020
+ group.appendChild(
2021
+ checkboxField(t2("echarts.panel.labelLine.show"), state.labelLine.show === true, (checked) => commit({ labelLine: { show: checked } }))
2022
+ );
2023
+ if (has("labelLine.length")) {
2024
+ const wrap = field(t2("echarts.panel.labelLine.length"));
2025
+ wrap.appendChild(
2026
+ textInput(
2027
+ { value: state.labelLine.length === void 0 ? "" : String(state.labelLine.length), type: "number" },
2028
+ (raw) => commitLineNumber("length", raw)
2029
+ )
2030
+ );
2031
+ group.appendChild(wrap);
2032
+ }
2033
+ if (has("labelLine.length2")) {
2034
+ const wrap = field(t2("echarts.panel.labelLine.length2"));
2035
+ wrap.appendChild(
2036
+ textInput(
2037
+ { value: state.labelLine.length2 === void 0 ? "" : String(state.labelLine.length2), type: "number" },
2038
+ (raw) => commitLineNumber("length2", raw)
2039
+ )
2040
+ );
2041
+ group.appendChild(wrap);
2042
+ }
2043
+ if (has("labelLine.smooth")) {
2044
+ group.appendChild(
2045
+ checkboxField(t2("echarts.panel.labelLine.smooth"), state.labelLine.smooth === true, (checked) => commit({ labelLine: { smooth: checked } }))
2046
+ );
2047
+ }
2048
+ }
2049
+ return group;
2050
+ }
814
2051
  function renderProperty(ctx) {
2052
+ return withTranslator(ctx.t, () => renderPropertyInner(ctx));
2053
+ }
2054
+ function renderPropertyInner(ctx) {
815
2055
  const element = ctx.element;
816
2056
  const type = elementType(element);
817
- const def = getChartKindDefinition2(type);
818
- const fields = resolveChartPanelFields2(type);
2057
+ const def = getChartKindDefinition(type);
2058
+ const fields = resolveChartPanelFields(type);
819
2059
  const has = (key) => fields.includes(key);
820
2060
  const options = element.options;
821
2061
  const widthMm = Number(options.width) || 0;
822
2062
  const heightMm = Number(options.height) || 0;
823
2063
  const limit = maxValueFields(def);
824
- const palettes = getChartPalettes2();
2064
+ const palettes = getChartPalettes();
2065
+ const fieldLabels = fieldLabelMap(ctx.fields);
825
2066
  const root = el("div", "echarts-property");
826
2067
  const form = el("form", "pd-form");
827
2068
  form.addEventListener("submit", (event) => event.preventDefault());
828
2069
  root.appendChild(form);
829
2070
  if (has("dataSource")) {
830
- const wrap = field("\u6570\u636E\u6E90");
831
- const candidates = dataSourceCandidates(ctx.data);
832
- let datalist;
833
- if (candidates.length > 0) {
834
- datalist = el("datalist");
835
- datalist.id = `echarts-ds-${++datalistSeq}`;
836
- for (const key of candidates) {
837
- const optionEl = el("option");
838
- optionEl.value = key;
839
- datalist.appendChild(optionEl);
840
- }
841
- }
2071
+ const wrap = field(t2("echarts.panel.dataSourceTitle"));
2072
+ const current = String(options.chartDataSource ?? "");
842
2073
  wrap.appendChild(
843
- textInput(
844
- {
845
- value: String(options.chartDataSource ?? ""),
846
- placeholder: "\u6570\u636E\u96C6\u8DEF\u5F84\uFF08\u7559\u7A7A\u53D6\u9876\u5C42\u7B2C\u4E00\u4E2A\u6570\u7EC4\uFF09",
847
- list: datalist?.id
848
- },
2074
+ dropdownSelect(
2075
+ dropdownOptions(dataSourceCandidates(ctx.data), current, fieldLabels),
2076
+ current,
849
2077
  (value) => commitOption(ctx, type, panelOption(element), { chartDataSource: value })
850
2078
  )
851
2079
  );
852
- if (datalist) wrap.appendChild(datalist);
853
2080
  form.appendChild(wrap);
854
2081
  }
855
2082
  if (has("categoryField")) {
856
- const wrap = field("\u7C7B\u76EE\u5B57\u6BB5");
2083
+ const wrap = field(t2("echarts.panel.categoryField"));
2084
+ const current = String(options.chartCategoryField ?? "");
857
2085
  wrap.appendChild(
858
- textInput(
859
- { value: String(options.chartCategoryField ?? ""), placeholder: "\u5982 name" },
2086
+ dropdownSelect(
2087
+ dropdownOptions(dataRowFields(ctx.data, String(options.chartDataSource ?? "")), current, fieldLabels),
2088
+ current,
860
2089
  (value) => commitOption(ctx, type, panelOption(element), { chartCategoryField: value })
861
2090
  )
862
2091
  );
@@ -868,8 +2097,9 @@ function renderProperty(ctx) {
868
2097
  fieldsNow.forEach((value, index) => {
869
2098
  const row = el("div", "echarts-field-row");
870
2099
  row.appendChild(
871
- textInput(
872
- { value, placeholder: "\u5982 value" },
2100
+ dropdownSelect(
2101
+ dropdownOptions(dataRowFields(ctx.data, String(options.chartDataSource ?? "")), value, fieldLabels),
2102
+ value,
873
2103
  (next) => {
874
2104
  const list = readValueFields(element);
875
2105
  list[index] = next;
@@ -880,14 +2110,14 @@ function renderProperty(ctx) {
880
2110
  if (fieldsNow.length > 1) {
881
2111
  const remove = el("button", "pd-button small", "\u2212");
882
2112
  remove.type = "button";
883
- remove.title = "\u5220\u9664\u8BE5\u5B57\u6BB5";
2113
+ remove.title = t2("echarts.panel.removeField");
884
2114
  remove.addEventListener("click", () => syncValueFields(ctx, type, readValueFields(element).filter((_, i) => i !== index)));
885
2115
  row.appendChild(remove);
886
2116
  }
887
2117
  wrap.appendChild(row);
888
2118
  });
889
2119
  if (fieldsNow.length < limit) {
890
- const add = el("button", "pd-button small", "+ \u6DFB\u52A0\u5B57\u6BB5");
2120
+ const add = el("button", "pd-button small", t2("echarts.panel.addField"));
891
2121
  add.type = "button";
892
2122
  add.addEventListener("click", () => syncValueFields(ctx, type, [...readValueFields(element), ""]));
893
2123
  wrap.appendChild(add);
@@ -895,10 +2125,10 @@ function renderProperty(ctx) {
895
2125
  form.appendChild(wrap);
896
2126
  }
897
2127
  if (has("seriesField")) {
898
- const wrap = field("\u7CFB\u5217\u62C6\u5206\u5B57\u6BB5");
2128
+ const wrap = field(t2("echarts.panel.seriesField"));
899
2129
  wrap.appendChild(
900
2130
  textInput(
901
- { value: String(options.chartSeriesField ?? ""), placeholder: "\u53EF\u9009\uFF0C\u5982 region\uFF08\u6309\u503C\u62C6\u6210\u591A\u7CFB\u5217\uFF09" },
2131
+ { value: String(options.chartSeriesField ?? ""), placeholder: t2("echarts.panel.seriesFieldHint") },
902
2132
  (value) => commitOption(ctx, type, panelOption(element), { chartSeriesField: value })
903
2133
  )
904
2134
  );
@@ -906,16 +2136,16 @@ function renderProperty(ctx) {
906
2136
  }
907
2137
  if (has("bubble")) {
908
2138
  form.appendChild(
909
- checkboxField("\u6C14\u6CE1\u5927\u5C0F", options.chartBubble === true, (checked) => {
2139
+ checkboxField(t2("echarts.panel.bubbleSize"), options.chartBubble === true, (checked) => {
910
2140
  commitOption(ctx, type, panelOption(element), { chartBubble: checked });
911
2141
  })
912
2142
  );
913
2143
  }
914
2144
  if (has("title")) {
915
- const wrap = field("\u56FE\u8868\u6807\u9898");
2145
+ const wrap = field(t2("echarts.panel.title"));
916
2146
  wrap.appendChild(
917
2147
  textInput(
918
- { value: String(asObject(panelOption(element).title).text ?? ""), placeholder: "\u7559\u7A7A\u4E0D\u663E\u793A\u6807\u9898" },
2148
+ { value: String(asObject(panelOption(element).title).text ?? ""), placeholder: t2("echarts.panel.titleHint") },
919
2149
  (value) => {
920
2150
  const next = panelOption(element);
921
2151
  next.title = { ...asObject(next.title), text: value };
@@ -928,7 +2158,7 @@ function renderProperty(ctx) {
928
2158
  if (has("legend")) {
929
2159
  const show = asObject(panelOption(element).legend).show !== false;
930
2160
  form.appendChild(
931
- checkboxField("\u663E\u793A\u56FE\u4F8B", show, (checked) => {
2161
+ checkboxField(t2("echarts.panel.legend"), show, (checked) => {
932
2162
  const next = panelOption(element);
933
2163
  next.legend = { ...asObject(next.legend), show: checked };
934
2164
  commitOption(ctx, type, next);
@@ -936,12 +2166,12 @@ function renderProperty(ctx) {
936
2166
  );
937
2167
  }
938
2168
  if (has("palette")) {
939
- const wrap = field("\u914D\u8272");
2169
+ const wrap = field(t2("echarts.panel.palette"));
940
2170
  const select = el("select", "pd-select");
941
2171
  for (const palette of palettes) {
942
2172
  const optionEl = el("option");
943
2173
  optionEl.value = palette.key;
944
- optionEl.textContent = palette.label;
2174
+ optionEl.textContent = palette.labelKey ? t2(palette.labelKey) : palette.label;
945
2175
  select.appendChild(optionEl);
946
2176
  }
947
2177
  select.value = readPaletteKey(panelOption(element), palettes);
@@ -954,11 +2184,14 @@ function renderProperty(ctx) {
954
2184
  wrap.appendChild(select);
955
2185
  form.appendChild(wrap);
956
2186
  }
2187
+ if (has("label")) {
2188
+ form.appendChild(renderLabelGroup(ctx, type));
2189
+ }
957
2190
  if (has("stack")) {
958
2191
  const series = seriesList(panelOption(element));
959
2192
  const stacked = series.some((item) => item.stack !== void 0 && item.stack !== null && item.stack !== "");
960
2193
  form.appendChild(
961
- checkboxField("\u5806\u53E0\u663E\u793A", stacked, (checked) => {
2194
+ checkboxField(t2("echarts.panel.stack"), stacked, (checked) => {
962
2195
  const next = panelOption(element);
963
2196
  for (const item of seriesList(next)) {
964
2197
  if (checked) item.stack = "total";
@@ -969,34 +2202,34 @@ function renderProperty(ctx) {
969
2202
  );
970
2203
  }
971
2204
  if (has("innerRadius")) {
972
- const wrap = field("\u5185\u5F84\uFF08%\uFF09");
2205
+ const wrap = field(t2("echarts.panel.innerRadius"));
973
2206
  const radius = seriesList(panelOption(element))[0]?.radius;
974
2207
  const inner = Array.isArray(radius) ? Number(String(radius[0] ?? "40%").replace("%", "")) || 40 : 40;
975
2208
  wrap.appendChild(
976
2209
  textInput({ value: String(inner), type: "number", min: 0, max: 90 }, (value) => {
977
2210
  const next = panelOption(element);
978
2211
  const series = seriesList(next);
979
- if (series[0]) series[0].radius = [`${clamp(Number(value) || 0, 0, 90)}%`, "70%"];
2212
+ if (series[0]) series[0].radius = [`${clamp2(Number(value) || 0, 0, 90)}%`, "70%"];
980
2213
  commitOption(ctx, type, next);
981
2214
  })
982
2215
  );
983
2216
  form.appendChild(wrap);
984
2217
  }
985
2218
  if (has("padding")) {
986
- const wrap = field("\u5185\u8FB9\u8DDD \u4E0A/\u53F3/\u4E0B/\u5DE6 (%)");
2219
+ const wrap = field(t2("echarts.panel.paddingTRBL"));
987
2220
  const padding = readFunnelPadding(panelOption(element), widthMm, heightMm);
988
2221
  const row = el("div", "echarts-field-row");
989
2222
  const sides = [
990
- { side: "top", title: "\u4E0A\u8FB9\u8DDD" },
991
- { side: "right", title: "\u53F3\u8FB9\u8DDD\uFF08\u7559\u5916\u7F6E\u6807\u7B7E\uFF09" },
992
- { side: "bottom", title: "\u4E0B\u8FB9\u8DDD" },
993
- { side: "left", title: "\u5DE6\u8FB9\u8DDD" }
2223
+ { side: "top", title: t2("echarts.panel.paddingTop") },
2224
+ { side: "right", title: t2("echarts.panel.paddingRight") },
2225
+ { side: "bottom", title: t2("echarts.panel.paddingBottom") },
2226
+ { side: "left", title: t2("echarts.panel.paddingLeft") }
994
2227
  ];
995
2228
  for (const { side, title } of sides) {
996
2229
  row.appendChild(
997
2230
  textInput({ value: String(padding[side]), type: "number", min: 0, max: 60, title }, (value) => {
998
2231
  const raw = Number(value);
999
- const next = Number.isFinite(raw) ? clamp(raw, 0, 60) : FUNNEL_PADDING_DEFAULTS2[side];
2232
+ const next = Number.isFinite(raw) ? clamp2(raw, 0, 60) : FUNNEL_PADDING_DEFAULTS[side];
1000
2233
  const option = panelOption(element);
1001
2234
  const current = readFunnelPadding(option, widthMm, heightMm);
1002
2235
  commitOption(ctx, type, writeFunnelPadding(option, { ...current, [side]: next }));
@@ -1007,13 +2240,13 @@ function renderProperty(ctx) {
1007
2240
  form.appendChild(wrap);
1008
2241
  }
1009
2242
  if (has("radius")) {
1010
- const wrap = field("\u534A\u5F84\uFF08%\uFF09");
2243
+ const wrap = field(t2("echarts.panel.radius"));
1011
2244
  wrap.appendChild(
1012
2245
  textInput(
1013
2246
  { value: String(readRadarRadius(panelOption(element), widthMm, heightMm)), type: "number", min: 20, max: 100 },
1014
2247
  (value) => {
1015
2248
  const raw = Number(value);
1016
- const next = Number.isFinite(raw) ? clamp(raw, 20, 100) : RADAR_RADIUS_DEFAULT2;
2249
+ const next = Number.isFinite(raw) ? clamp2(raw, 20, 100) : RADAR_RADIUS_DEFAULT;
1017
2250
  commitOption(ctx, type, writeRadarRadius(panelOption(element), next));
1018
2251
  }
1019
2252
  )
@@ -1021,7 +2254,7 @@ function renderProperty(ctx) {
1021
2254
  form.appendChild(wrap);
1022
2255
  }
1023
2256
  if (has("gaugeRange")) {
1024
- const wrap = field("\u6700\u5C0F / \u6700\u5927\u503C");
2257
+ const wrap = field(t2("echarts.panel.minMax"));
1025
2258
  const series = seriesList(panelOption(element));
1026
2259
  const row = el("div", "echarts-field-row");
1027
2260
  row.appendChild(
@@ -1043,17 +2276,19 @@ function renderProperty(ctx) {
1043
2276
  wrap.appendChild(row);
1044
2277
  form.appendChild(wrap);
1045
2278
  }
1046
- form.appendChild(el("p", "pd-hint", PANEL_HINT));
2279
+ form.appendChild(el("p", "pd-hint", panelHint()));
1047
2280
  return root;
1048
2281
  }
1049
2282
  var CHART_ELEMENT_UI = defineElementUI({
1050
- types: CHART_KINDS2,
2283
+ types: CHART_KINDS,
1051
2284
  renderCanvas,
1052
2285
  renderProperty,
1053
2286
  hasProperties: chartHasProperties,
1054
- group: "\u56FE\u8868",
2287
+ group: t2("echarts.panel.group"),
1055
2288
  searchKeywords: SEARCH_KEYWORDS,
1056
- styles: STYLES
2289
+ styles: STYLES,
2290
+ i18nId: "echarts",
2291
+ locales: { "zh-CN": zh_CN_default.echarts, "en-US": en_US_default.echarts, "th-TH": th_TH_default.echarts }
1057
2292
  });
1058
2293
  var disposeHandle2;
1059
2294
  function installChartCommonUI() {