@worm-print-platform/echarts 1.6.0 → 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.
- package/README.md +1 -1
- package/dist/bind.d.ts +1 -1
- package/dist/browser/executor.iife.d.ts +1 -1
- package/dist/browser-bundle.d.ts +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/constants.d.ts +5 -1
- package/dist/defaults.d.ts +1 -1
- package/dist/echarts.d.ts +1 -1
- package/dist/echarts.js +38 -14
- package/dist/executor.iife.global.d.ts +1 -1
- package/dist/executor.iife.global.js +29 -17
- package/dist/i18n/en-US.json +153 -0
- package/dist/i18n/th-TH.json +153 -0
- package/dist/i18n/zh-CN.json +153 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/kinds.d.ts +5 -1
- package/dist/kit.cjs +2 -2
- package/dist/kit.d.ts +1 -1
- package/dist/kit.js +2 -2
- package/dist/label.d.ts +3 -1
- package/dist/marketplace.d.ts +1 -1
- package/dist/marketplace.js +650 -136
- package/dist/node.cjs +46 -19
- package/dist/node.d.ts +1 -1
- package/dist/node.js +46 -19
- package/dist/normalize.d.ts +1 -1
- package/dist/option-utils.d.ts +1 -1
- package/dist/plugin-8R67OtBD.cjs +6 -0
- package/dist/plugin-CKyaiHYF.js +960 -0
- package/dist/plugin.d.ts +1 -1
- package/dist/renderer.d.ts +1 -1
- package/dist/test-setup.d.ts +7 -0
- package/dist/type-augmentation.d.ts +1 -1
- package/dist/ui.cjs +650 -136
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +650 -136
- package/dist/units.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +29 -3
- package/dist/plugin-BWmSrZ3m.cjs +0 -6
- package/dist/plugin-Dvcrcg_Z.js +0 -933
package/dist/ui.js
CHANGED
|
@@ -1,16 +1,485 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.6.
|
|
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
|
+
// src/ui.ts
|
|
9
|
+
import { t as globalT } from "@worm-print-platform/core/i18n";
|
|
10
|
+
|
|
11
|
+
// src/i18n/zh-CN.json
|
|
12
|
+
var zh_CN_default = {
|
|
13
|
+
echarts: {
|
|
14
|
+
"echarts.panel.chart": "\u56FE\u8868",
|
|
15
|
+
"echarts.panel.config": "\u914D\u7F6E",
|
|
16
|
+
"echarts.panel.dataSource": "\u6570\u636E\u6E90",
|
|
17
|
+
"echarts.panel.category": "\u7C7B\u76EE",
|
|
18
|
+
"echarts.panel.value": "\u6570\u503C",
|
|
19
|
+
"echarts.panel.series": "\u7CFB\u5217",
|
|
20
|
+
"echarts.panel.chartType.bar": "\u67F1\u72B6",
|
|
21
|
+
"echarts.panel.chartType.barH": "\u6761\u5F62",
|
|
22
|
+
"echarts.panel.chartType.line": "\u6298\u7EBF",
|
|
23
|
+
"echarts.panel.chartType.area": "\u9762\u79EF",
|
|
24
|
+
"echarts.panel.chartType.pie": "\u997C",
|
|
25
|
+
"echarts.panel.chartType.doughnut": "\u73AF\u5F62",
|
|
26
|
+
"echarts.panel.chartType.scatter": "\u6563\u70B9",
|
|
27
|
+
"echarts.panel.chartType.radar": "\u96F7\u8FBE",
|
|
28
|
+
"echarts.panel.chartType.funnel": "\u6F0F\u6597",
|
|
29
|
+
"echarts.panel.chartType.gauge": "\u4EEA\u8868",
|
|
30
|
+
"echarts.panel.dataLabel": "\u6570\u636E\u6807\u7B7E",
|
|
31
|
+
"echarts.panel.valueLabel": "\u6570\u503C\u6807\u7B7E",
|
|
32
|
+
"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",
|
|
33
|
+
"echarts.panel.field.dimension": "\u7EF4\u5EA6\u5B57\u6BB5\uFF08\u6BCF\u4E2A\u5B57\u6BB5\u4E00\u4E2A\u7EF4\u5EA6\uFF09",
|
|
34
|
+
"echarts.panel.field.value": "\u6570\u503C\u5B57\u6BB5",
|
|
35
|
+
"echarts.panel.field.valueMulti": "\u6570\u503C\u5B57\u6BB5\uFF08\u591A\u503C\u591A\u7CFB\u5217\uFF09",
|
|
36
|
+
"echarts.panel.default": "\uFF08\u9ED8\u8BA4\uFF09",
|
|
37
|
+
"echarts.panel.current": "\uFF08\u5F53\u524D\uFF09",
|
|
38
|
+
"echarts.panel.defaultFirstArray": "\uFF08\u9ED8\u8BA4\uFF1A\u9876\u5C42\u7B2C\u4E00\u4E2A\u6570\u7EC4\uFF09",
|
|
39
|
+
"echarts.panel.error.invalidOption": "\u56FE\u8868 option \u975E\u6CD5\uFF1A\u9700\u8981\u5BF9\u8C61",
|
|
40
|
+
"echarts.panel.chartFallback": "\u56FE\u8868",
|
|
41
|
+
"echarts.panel.optionDefault": "\uFF08\u9ED8\u8BA4\uFF09",
|
|
42
|
+
"echarts.panel.overflow.default": "\u9ED8\u8BA4",
|
|
43
|
+
"echarts.panel.overflow.none": "\u4E0D\u5904\u7406\uFF08\u663E\u793A\u5B8C\u6574\uFF09",
|
|
44
|
+
"echarts.panel.overflow.truncate": "\u622A\u65AD",
|
|
45
|
+
"echarts.panel.overflow.break": "\u6362\u884C",
|
|
46
|
+
"echarts.panel.fontWeight.default": "\u9ED8\u8BA4",
|
|
47
|
+
"echarts.panel.fontWeight.normal": "\u5E38\u89C4",
|
|
48
|
+
"echarts.panel.fontWeight.bold": "\u52A0\u7C97",
|
|
49
|
+
"echarts.panel.label.distance": "\u8DDD\u79BB",
|
|
50
|
+
"echarts.panel.label.rotate": "\u65CB\u8F6C\uFF08\u5EA6\uFF09",
|
|
51
|
+
"echarts.panel.label.fontSize": "\u5B57\u53F7",
|
|
52
|
+
"echarts.panel.label.fontWeight": "\u5B57\u91CD",
|
|
53
|
+
"echarts.panel.label.color": "\u6587\u5B57\u989C\u8272",
|
|
54
|
+
"echarts.panel.label.backgroundColor": "\u80CC\u666F\u8272",
|
|
55
|
+
"echarts.panel.label.borderColor": "\u8FB9\u6846\u8272",
|
|
56
|
+
"echarts.panel.label.borderWidth": "\u8FB9\u6846\u5BBD\u5EA6",
|
|
57
|
+
"echarts.panel.label.borderRadius": "\u5706\u89D2",
|
|
58
|
+
"echarts.panel.label.padding": "\u5185\u8FB9\u8DDD",
|
|
59
|
+
"echarts.panel.label.show": "\u663E\u793A\u6570\u636E\u6807\u7B7E",
|
|
60
|
+
"echarts.panel.label.content": "\u5185\u5BB9",
|
|
61
|
+
"echarts.panel.label.formatterTitle": "\u6570\u636E\u6807\u7B7E\u5185\u5BB9",
|
|
62
|
+
"echarts.panel.label.formatterCustom": "\u81EA\u5B9A\u4E49 / \u9ED8\u8BA4",
|
|
63
|
+
"echarts.panel.label.formatterPlaceholder": "\u5982 {b}: {c}",
|
|
64
|
+
"echarts.panel.label.overflow": "\u6EA2\u51FA\u5904\u7406",
|
|
65
|
+
"echarts.panel.label.position": "\u4F4D\u7F6E",
|
|
66
|
+
"echarts.panel.label.positionTitle": "\u6807\u7B7E\u4F4D\u7F6E",
|
|
67
|
+
"echarts.panel.label.positionDefault": "\u9ED8\u8BA4",
|
|
68
|
+
"echarts.panel.label.offset": "\u504F\u79FB X / Y",
|
|
69
|
+
"echarts.panel.label.style": "\u6837\u5F0F",
|
|
70
|
+
"echarts.panel.labelLine.fontWeight": "\u5B57\u91CD",
|
|
71
|
+
"echarts.panel.labelLine": "\u5F15\u5BFC\u7EBF",
|
|
72
|
+
"echarts.panel.labelLine.show": "\u663E\u793A\u5F15\u5BFC\u7EBF",
|
|
73
|
+
"echarts.panel.labelLine.length": "\u5F15\u5BFC\u7EBF\u957F\u5EA6",
|
|
74
|
+
"echarts.panel.labelLine.length2": "\u7B2C\u4E8C\u6BB5\u957F\u5EA6",
|
|
75
|
+
"echarts.panel.labelLine.smooth": "\u5E73\u6ED1\u5F15\u5BFC\u7EBF",
|
|
76
|
+
"echarts.panel.dataSourceTitle": "\u6570\u636E\u6E90",
|
|
77
|
+
"echarts.panel.categoryField": "\u7C7B\u76EE\u5B57\u6BB5",
|
|
78
|
+
"echarts.panel.removeField": "\u5220\u9664\u8BE5\u5B57\u6BB5",
|
|
79
|
+
"echarts.panel.addField": "+ \u6DFB\u52A0\u5B57\u6BB5",
|
|
80
|
+
"echarts.panel.seriesField": "\u7CFB\u5217\u62C6\u5206\u5B57\u6BB5",
|
|
81
|
+
"echarts.panel.seriesFieldHint": "\u53EF\u9009\uFF0C\u5982 region\uFF08\u6309\u503C\u62C6\u6210\u591A\u7CFB\u5217\uFF09",
|
|
82
|
+
"echarts.panel.bubbleSize": "\u6C14\u6CE1\u5927\u5C0F",
|
|
83
|
+
"echarts.panel.title": "\u56FE\u8868\u6807\u9898",
|
|
84
|
+
"echarts.panel.titleHint": "\u7559\u7A7A\u4E0D\u663E\u793A\u6807\u9898",
|
|
85
|
+
"echarts.panel.legend": "\u663E\u793A\u56FE\u4F8B",
|
|
86
|
+
"echarts.panel.palette": "\u914D\u8272",
|
|
87
|
+
"echarts.palette.default": "\u9ED8\u8BA4\u84DD",
|
|
88
|
+
"echarts.palette.fresh": "\u6E05\u65B0\u7EFF",
|
|
89
|
+
"echarts.palette.warm": "\u6696\u6A59\u7EA2",
|
|
90
|
+
"echarts.palette.purple": "\u7D2B\u7070",
|
|
91
|
+
"echarts.panel.stack": "\u5806\u53E0\u663E\u793A",
|
|
92
|
+
"echarts.panel.innerRadius": "\u5185\u5F84\uFF08%\uFF09",
|
|
93
|
+
"echarts.panel.paddingTRBL": "\u5185\u8FB9\u8DDD \u4E0A/\u53F3/\u4E0B/\u5DE6 (%)",
|
|
94
|
+
"echarts.panel.paddingTop": "\u4E0A\u8FB9\u8DDD",
|
|
95
|
+
"echarts.panel.paddingRight": "\u53F3\u8FB9\u8DDD\uFF08\u7559\u5916\u7F6E\u6807\u7B7E\uFF09",
|
|
96
|
+
"echarts.panel.paddingBottom": "\u4E0B\u8FB9\u8DDD",
|
|
97
|
+
"echarts.panel.paddingLeft": "\u5DE6\u8FB9\u8DDD",
|
|
98
|
+
"echarts.panel.radius": "\u534A\u5F84\uFF08%\uFF09",
|
|
99
|
+
"echarts.panel.minMax": "\u6700\u5C0F / \u6700\u5927\u503C",
|
|
100
|
+
"echarts.panel.group": "\u56FE\u8868",
|
|
101
|
+
"echarts.series.typeNames.bar": "\u67F1\u72B6\u56FE",
|
|
102
|
+
"echarts.series.typeNames.barH": "\u6761\u5F62\u56FE",
|
|
103
|
+
"echarts.series.typeNames.line": "\u6298\u7EBF\u56FE",
|
|
104
|
+
"echarts.series.typeNames.area": "\u9762\u79EF\u56FE",
|
|
105
|
+
"echarts.series.typeNames.pie": "\u997C\u56FE",
|
|
106
|
+
"echarts.series.typeNames.doughnut": "\u73AF\u5F62\u56FE",
|
|
107
|
+
"echarts.series.typeNames.scatter": "\u6563\u70B9\u56FE",
|
|
108
|
+
"echarts.series.typeNames.radar": "\u96F7\u8FBE\u56FE",
|
|
109
|
+
"echarts.series.typeNames.funnel": "\u6F0F\u6597\u56FE",
|
|
110
|
+
"echarts.series.typeNames.gauge": "\u4EEA\u8868\u76D8",
|
|
111
|
+
"echarts.label.formatter.value": "\u6570\u503C",
|
|
112
|
+
"echarts.label.formatter.nameValue": "\u540D\u79F0: \u6570\u503C",
|
|
113
|
+
"echarts.label.formatter.name": "\u540D\u79F0",
|
|
114
|
+
"echarts.label.formatter.percent": "\u767E\u5206\u6BD4",
|
|
115
|
+
"echarts.label.position.bar.top": "\u9876\u90E8",
|
|
116
|
+
"echarts.label.position.bar.inside": "\u5185\u90E8",
|
|
117
|
+
"echarts.label.position.bar.insideTop": "\u5185\u90E8\u9876\u7AEF",
|
|
118
|
+
"echarts.label.position.bar.bottom": "\u5E95\u90E8",
|
|
119
|
+
"echarts.label.position.bar.insideBottom": "\u5185\u90E8\u5E95\u7AEF",
|
|
120
|
+
"echarts.label.position.bar.right": "\u53F3\u4FA7",
|
|
121
|
+
"echarts.label.position.bar.left": "\u5DE6\u4FA7",
|
|
122
|
+
"echarts.label.position.bar.middle": "\u5C45\u4E2D",
|
|
123
|
+
"echarts.label.position.line.top": "\u9876\u90E8",
|
|
124
|
+
"echarts.label.position.line.bottom": "\u5E95\u90E8",
|
|
125
|
+
"echarts.label.position.line.inside": "\u5185\u90E8",
|
|
126
|
+
"echarts.label.position.line.left": "\u5DE6\u4FA7",
|
|
127
|
+
"echarts.label.position.line.right": "\u53F3\u4FA7",
|
|
128
|
+
"echarts.label.position.pie.outside": "\u5916\u4FA7",
|
|
129
|
+
"echarts.label.position.pie.inside": "\u5185\u90E8",
|
|
130
|
+
"echarts.label.position.pie.center": "\u4E2D\u5FC3",
|
|
131
|
+
"echarts.label.position.scatter.top": "\u9876\u90E8",
|
|
132
|
+
"echarts.label.position.scatter.bottom": "\u5E95\u90E8",
|
|
133
|
+
"echarts.label.position.scatter.left": "\u5DE6\u4FA7",
|
|
134
|
+
"echarts.label.position.scatter.right": "\u53F3\u4FA7",
|
|
135
|
+
"echarts.label.position.scatter.inside": "\u5185\u90E8",
|
|
136
|
+
"echarts.label.position.radar.top": "\u9876\u90E8",
|
|
137
|
+
"echarts.label.position.radar.bottom": "\u5E95\u90E8",
|
|
138
|
+
"echarts.label.position.radar.left": "\u5DE6\u4FA7",
|
|
139
|
+
"echarts.label.position.radar.right": "\u53F3\u4FA7",
|
|
140
|
+
"echarts.label.position.radar.inside": "\u5185\u90E8",
|
|
141
|
+
"echarts.label.position.funnel.outer": "\u5916\u4FA7",
|
|
142
|
+
"echarts.label.position.funnel.inner": "\u5185\u90E8",
|
|
143
|
+
"echarts.label.position.funnel.left": "\u5DE6\u4FA7",
|
|
144
|
+
"echarts.label.position.funnel.right": "\u53F3\u4FA7",
|
|
145
|
+
"echarts.label.position.funnel.top": "\u9876\u90E8",
|
|
146
|
+
"echarts.label.position.funnel.bottom": "\u5E95\u90E8",
|
|
147
|
+
"echarts.meta.chartOption": "\u56FE\u8868 option",
|
|
148
|
+
"echarts.meta.dataSource": "\u6570\u636E\u6E90",
|
|
149
|
+
"echarts.meta.categoryField": "\u7C7B\u76EE\u5B57\u6BB5",
|
|
150
|
+
"echarts.meta.valueFields": "\u6570\u503C\u5B57\u6BB5",
|
|
151
|
+
"echarts.meta.seriesField": "\u7CFB\u5217\u62C6\u5206\u5B57\u6BB5",
|
|
152
|
+
"echarts.meta.bubbleSize": "\u6C14\u6CE1\u5927\u5C0F",
|
|
153
|
+
"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",
|
|
154
|
+
"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",
|
|
155
|
+
"echarts.notes.line": "\u6298\u7EBF\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF1B\u4E0D\u5199 areaStyle",
|
|
156
|
+
"echarts.notes.area": "\u9762\u79EF\u56FE\uFF1A\u6298\u7EBF + series[].areaStyle\uFF1B\u5176\u4F59\u540C\u6298\u7EBF\u56FE",
|
|
157
|
+
"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",
|
|
158
|
+
"echarts.notes.doughnut": "\u73AF\u5F62\u56FE\uFF1A\u997C\u56FE + radius:[\u5185\u5F84,\u5916\u5F84]\uFF1B\u5185\u5F84\u7531\u9762\u677F\u914D\u7F6E",
|
|
159
|
+
"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",
|
|
160
|
+
"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",
|
|
161
|
+
"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",
|
|
162
|
+
"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"
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// src/i18n/en-US.json
|
|
167
|
+
var en_US_default = {
|
|
168
|
+
echarts: {
|
|
169
|
+
"echarts.panel.chart": "Chart",
|
|
170
|
+
"echarts.panel.config": "Config",
|
|
171
|
+
"echarts.panel.dataSource": "Data source",
|
|
172
|
+
"echarts.panel.category": "Category",
|
|
173
|
+
"echarts.panel.value": "Value",
|
|
174
|
+
"echarts.panel.series": "Series",
|
|
175
|
+
"echarts.panel.chartType.bar": "Bar",
|
|
176
|
+
"echarts.panel.chartType.barH": "Horizontal bar",
|
|
177
|
+
"echarts.panel.chartType.line": "Line",
|
|
178
|
+
"echarts.panel.chartType.area": "Area",
|
|
179
|
+
"echarts.panel.chartType.pie": "Pie",
|
|
180
|
+
"echarts.panel.chartType.doughnut": "Doughnut",
|
|
181
|
+
"echarts.panel.chartType.scatter": "Scatter",
|
|
182
|
+
"echarts.panel.chartType.radar": "Radar",
|
|
183
|
+
"echarts.panel.chartType.funnel": "Funnel",
|
|
184
|
+
"echarts.panel.chartType.gauge": "Gauge",
|
|
185
|
+
"echarts.panel.dataLabel": "Data label",
|
|
186
|
+
"echarts.panel.valueLabel": "Value label",
|
|
187
|
+
"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.",
|
|
188
|
+
"echarts.panel.field.dimension": "Dimension fields (one per dimension)",
|
|
189
|
+
"echarts.panel.field.value": "Value fields",
|
|
190
|
+
"echarts.panel.field.valueMulti": "Value fields (multiple values, multiple series)",
|
|
191
|
+
"echarts.panel.default": "(default)",
|
|
192
|
+
"echarts.panel.current": "(current)",
|
|
193
|
+
"echarts.panel.defaultFirstArray": "(default: first top-level array)",
|
|
194
|
+
"echarts.panel.error.invalidOption": "Invalid chart option: expected an object",
|
|
195
|
+
"echarts.panel.chartFallback": "Chart",
|
|
196
|
+
"echarts.panel.optionDefault": "(default)",
|
|
197
|
+
"echarts.panel.overflow.default": "Default",
|
|
198
|
+
"echarts.panel.overflow.none": "None (show full)",
|
|
199
|
+
"echarts.panel.overflow.truncate": "Truncate",
|
|
200
|
+
"echarts.panel.overflow.break": "Wrap",
|
|
201
|
+
"echarts.panel.fontWeight.default": "Default",
|
|
202
|
+
"echarts.panel.fontWeight.normal": "Regular",
|
|
203
|
+
"echarts.panel.fontWeight.bold": "Bold",
|
|
204
|
+
"echarts.panel.label.distance": "Distance",
|
|
205
|
+
"echarts.panel.label.rotate": "Rotation (deg)",
|
|
206
|
+
"echarts.panel.label.fontSize": "Font size",
|
|
207
|
+
"echarts.panel.label.fontWeight": "Font weight",
|
|
208
|
+
"echarts.panel.label.color": "Text color",
|
|
209
|
+
"echarts.panel.label.backgroundColor": "Background color",
|
|
210
|
+
"echarts.panel.label.borderColor": "Border color",
|
|
211
|
+
"echarts.panel.label.borderWidth": "Border width",
|
|
212
|
+
"echarts.panel.label.borderRadius": "Radius",
|
|
213
|
+
"echarts.panel.label.padding": "Padding",
|
|
214
|
+
"echarts.panel.label.show": "Show data labels",
|
|
215
|
+
"echarts.panel.label.content": "Content",
|
|
216
|
+
"echarts.panel.label.formatterTitle": "Data label content",
|
|
217
|
+
"echarts.panel.label.formatterCustom": "Custom / Default",
|
|
218
|
+
"echarts.panel.label.formatterPlaceholder": "e.g. {b}: {c}",
|
|
219
|
+
"echarts.panel.label.overflow": "Overflow",
|
|
220
|
+
"echarts.panel.label.position": "Position",
|
|
221
|
+
"echarts.panel.label.positionTitle": "Label position",
|
|
222
|
+
"echarts.panel.label.positionDefault": "Default",
|
|
223
|
+
"echarts.panel.label.offset": "Offset X / Y",
|
|
224
|
+
"echarts.panel.label.style": "Style",
|
|
225
|
+
"echarts.panel.labelLine.fontWeight": "Font weight",
|
|
226
|
+
"echarts.panel.labelLine": "Label line",
|
|
227
|
+
"echarts.panel.labelLine.show": "Show label line",
|
|
228
|
+
"echarts.panel.labelLine.length": "Label line length",
|
|
229
|
+
"echarts.panel.labelLine.length2": "Second segment length",
|
|
230
|
+
"echarts.panel.labelLine.smooth": "Smooth label line",
|
|
231
|
+
"echarts.panel.dataSourceTitle": "Data source",
|
|
232
|
+
"echarts.panel.categoryField": "Category field",
|
|
233
|
+
"echarts.panel.removeField": "Remove this field",
|
|
234
|
+
"echarts.panel.addField": "+ Add field",
|
|
235
|
+
"echarts.panel.seriesField": "Series split field",
|
|
236
|
+
"echarts.panel.seriesFieldHint": "Optional, e.g. region (splits into series by value)",
|
|
237
|
+
"echarts.panel.bubbleSize": "Bubble size",
|
|
238
|
+
"echarts.panel.title": "Chart title",
|
|
239
|
+
"echarts.panel.titleHint": "Leave empty to hide the title",
|
|
240
|
+
"echarts.panel.legend": "Show legend",
|
|
241
|
+
"echarts.panel.palette": "Color palette",
|
|
242
|
+
"echarts.palette.default": "Default blue",
|
|
243
|
+
"echarts.palette.fresh": "Fresh green",
|
|
244
|
+
"echarts.palette.warm": "Warm orange-red",
|
|
245
|
+
"echarts.palette.purple": "Purple grey",
|
|
246
|
+
"echarts.panel.stack": "Stacked",
|
|
247
|
+
"echarts.panel.innerRadius": "Inner radius (%)",
|
|
248
|
+
"echarts.panel.paddingTRBL": "Padding top/right/bottom/left (%)",
|
|
249
|
+
"echarts.panel.paddingTop": "Top padding",
|
|
250
|
+
"echarts.panel.paddingRight": "Right padding (for outer labels)",
|
|
251
|
+
"echarts.panel.paddingBottom": "Bottom padding",
|
|
252
|
+
"echarts.panel.paddingLeft": "Left padding",
|
|
253
|
+
"echarts.panel.radius": "Radius (%)",
|
|
254
|
+
"echarts.panel.minMax": "Min / max",
|
|
255
|
+
"echarts.panel.group": "Chart",
|
|
256
|
+
"echarts.series.typeNames.bar": "Bar chart",
|
|
257
|
+
"echarts.series.typeNames.barH": "Horizontal bar chart",
|
|
258
|
+
"echarts.series.typeNames.line": "Line chart",
|
|
259
|
+
"echarts.series.typeNames.area": "Area chart",
|
|
260
|
+
"echarts.series.typeNames.pie": "Pie chart",
|
|
261
|
+
"echarts.series.typeNames.doughnut": "Doughnut chart",
|
|
262
|
+
"echarts.series.typeNames.scatter": "Scatter chart",
|
|
263
|
+
"echarts.series.typeNames.radar": "Radar chart",
|
|
264
|
+
"echarts.series.typeNames.funnel": "Funnel chart",
|
|
265
|
+
"echarts.series.typeNames.gauge": "Gauge chart",
|
|
266
|
+
"echarts.label.formatter.value": "Value",
|
|
267
|
+
"echarts.label.formatter.nameValue": "Name: Value",
|
|
268
|
+
"echarts.label.formatter.name": "Name",
|
|
269
|
+
"echarts.label.formatter.percent": "Percentage",
|
|
270
|
+
"echarts.label.position.bar.top": "Top",
|
|
271
|
+
"echarts.label.position.bar.inside": "Inside",
|
|
272
|
+
"echarts.label.position.bar.insideTop": "Inside top",
|
|
273
|
+
"echarts.label.position.bar.bottom": "Bottom",
|
|
274
|
+
"echarts.label.position.bar.insideBottom": "Inside bottom",
|
|
275
|
+
"echarts.label.position.bar.right": "Right",
|
|
276
|
+
"echarts.label.position.bar.left": "Left",
|
|
277
|
+
"echarts.label.position.bar.middle": "Center",
|
|
278
|
+
"echarts.label.position.line.top": "Top",
|
|
279
|
+
"echarts.label.position.line.bottom": "Bottom",
|
|
280
|
+
"echarts.label.position.line.inside": "Inside",
|
|
281
|
+
"echarts.label.position.line.left": "Left",
|
|
282
|
+
"echarts.label.position.line.right": "Right",
|
|
283
|
+
"echarts.label.position.pie.outside": "Outside",
|
|
284
|
+
"echarts.label.position.pie.inside": "Inside",
|
|
285
|
+
"echarts.label.position.pie.center": "Center",
|
|
286
|
+
"echarts.label.position.scatter.top": "Top",
|
|
287
|
+
"echarts.label.position.scatter.bottom": "Bottom",
|
|
288
|
+
"echarts.label.position.scatter.left": "Left",
|
|
289
|
+
"echarts.label.position.scatter.right": "Right",
|
|
290
|
+
"echarts.label.position.scatter.inside": "Inside",
|
|
291
|
+
"echarts.label.position.radar.top": "Top",
|
|
292
|
+
"echarts.label.position.radar.bottom": "Bottom",
|
|
293
|
+
"echarts.label.position.radar.left": "Left",
|
|
294
|
+
"echarts.label.position.radar.right": "Right",
|
|
295
|
+
"echarts.label.position.radar.inside": "Inside",
|
|
296
|
+
"echarts.label.position.funnel.outer": "Outside",
|
|
297
|
+
"echarts.label.position.funnel.inner": "Inside",
|
|
298
|
+
"echarts.label.position.funnel.left": "Left",
|
|
299
|
+
"echarts.label.position.funnel.right": "Right",
|
|
300
|
+
"echarts.label.position.funnel.top": "Top",
|
|
301
|
+
"echarts.label.position.funnel.bottom": "Bottom",
|
|
302
|
+
"echarts.meta.chartOption": "Chart option",
|
|
303
|
+
"echarts.meta.dataSource": "Data source",
|
|
304
|
+
"echarts.meta.categoryField": "Category field",
|
|
305
|
+
"echarts.meta.valueFields": "Value fields",
|
|
306
|
+
"echarts.meta.seriesField": "Series split field",
|
|
307
|
+
"echarts.meta.bubbleSize": "Bubble size",
|
|
308
|
+
"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",
|
|
309
|
+
"echarts.notes.barH": "Horizontal bar: xAxis is the value axis, yAxis is the category axis; write the $data placeholder in yAxis.data for categories",
|
|
310
|
+
"echarts.notes.line": "Line chart: category + multiple value fields; do not write areaStyle",
|
|
311
|
+
"echarts.notes.area": "Area chart: line + series[].areaStyle; otherwise same as the line chart",
|
|
312
|
+
"echarts.notes.pie": "Pie chart: category + the first value field produce { name, value }; only one value field is needed",
|
|
313
|
+
"echarts.notes.doughnut": "Doughnut: pie + radius:[inner, outer]; the inner radius is configured in the panel",
|
|
314
|
+
"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",
|
|
315
|
+
"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)",
|
|
316
|
+
"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)",
|
|
317
|
+
"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"
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
// src/i18n/th-TH.json
|
|
322
|
+
var th_TH_default = {
|
|
323
|
+
echarts: {
|
|
324
|
+
"echarts.panel.chart": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
|
|
325
|
+
"echarts.panel.config": "\u0E01\u0E32\u0E23\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E04\u0E48\u0E32",
|
|
326
|
+
"echarts.panel.dataSource": "\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
327
|
+
"echarts.panel.category": "\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48",
|
|
328
|
+
"echarts.panel.value": "\u0E04\u0E48\u0E32",
|
|
329
|
+
"echarts.panel.series": "\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
330
|
+
"echarts.panel.chartType.bar": "\u0E41\u0E17\u0E48\u0E07",
|
|
331
|
+
"echarts.panel.chartType.barH": "\u0E41\u0E17\u0E48\u0E07\u0E41\u0E19\u0E27\u0E19\u0E2D\u0E19",
|
|
332
|
+
"echarts.panel.chartType.line": "\u0E40\u0E2A\u0E49\u0E19",
|
|
333
|
+
"echarts.panel.chartType.area": "\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48",
|
|
334
|
+
"echarts.panel.chartType.pie": "\u0E27\u0E07\u0E01\u0E25\u0E21",
|
|
335
|
+
"echarts.panel.chartType.doughnut": "\u0E27\u0E07\u0E01\u0E25\u0E21\u0E27\u0E07\u0E41\u0E2B\u0E27\u0E19",
|
|
336
|
+
"echarts.panel.chartType.scatter": "\u0E08\u0E38\u0E14\u0E01\u0E23\u0E30\u0E08\u0E32\u0E22",
|
|
337
|
+
"echarts.panel.chartType.radar": "\u0E40\u0E23\u0E14\u0E32\u0E23\u0E4C",
|
|
338
|
+
"echarts.panel.chartType.funnel": "\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07",
|
|
339
|
+
"echarts.panel.chartType.gauge": "\u0E40\u0E01\u0E08\u0E27\u0E31\u0E14",
|
|
340
|
+
"echarts.panel.dataLabel": "\u0E1B\u0E49\u0E32\u0E22\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
341
|
+
"echarts.panel.valueLabel": "\u0E1B\u0E49\u0E32\u0E22\u0E04\u0E48\u0E32",
|
|
342
|
+
"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",
|
|
343
|
+
"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)",
|
|
344
|
+
"echarts.panel.field.value": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32",
|
|
345
|
+
"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)",
|
|
346
|
+
"echarts.panel.default": "(\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19)",
|
|
347
|
+
"echarts.panel.current": "(\u0E1B\u0E31\u0E08\u0E08\u0E38\u0E1A\u0E31\u0E19)",
|
|
348
|
+
"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)",
|
|
349
|
+
"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",
|
|
350
|
+
"echarts.panel.chartFallback": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
|
|
351
|
+
"echarts.panel.optionDefault": "(\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19)",
|
|
352
|
+
"echarts.panel.overflow.default": "\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
|
|
353
|
+
"echarts.panel.overflow.none": "\u0E44\u0E21\u0E48\u0E21\u0E35 (\u0E41\u0E2A\u0E14\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14)",
|
|
354
|
+
"echarts.panel.overflow.truncate": "\u0E15\u0E31\u0E14\u0E17\u0E34\u0E49\u0E07",
|
|
355
|
+
"echarts.panel.overflow.break": "\u0E15\u0E31\u0E14\u0E04\u0E33",
|
|
356
|
+
"echarts.panel.fontWeight.default": "\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
|
|
357
|
+
"echarts.panel.fontWeight.normal": "\u0E1B\u0E01\u0E15\u0E34",
|
|
358
|
+
"echarts.panel.fontWeight.bold": "\u0E2B\u0E19\u0E32",
|
|
359
|
+
"echarts.panel.label.distance": "\u0E23\u0E30\u0E22\u0E30\u0E2B\u0E48\u0E32\u0E07",
|
|
360
|
+
"echarts.panel.label.rotate": "\u0E01\u0E32\u0E23\u0E2B\u0E21\u0E38\u0E19 (\u0E2D\u0E07\u0E28\u0E32)",
|
|
361
|
+
"echarts.panel.label.fontSize": "\u0E02\u0E19\u0E32\u0E14\u0E1F\u0E2D\u0E19\u0E15\u0E4C",
|
|
362
|
+
"echarts.panel.label.fontWeight": "\u0E19\u0E49\u0E33\u0E2B\u0E19\u0E31\u0E01\u0E1F\u0E2D\u0E19\u0E15\u0E4C",
|
|
363
|
+
"echarts.panel.label.color": "\u0E2A\u0E35\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21",
|
|
364
|
+
"echarts.panel.label.backgroundColor": "\u0E2A\u0E35\u0E1E\u0E37\u0E49\u0E19\u0E2B\u0E25\u0E31\u0E07",
|
|
365
|
+
"echarts.panel.label.borderColor": "\u0E2A\u0E35\u0E40\u0E2A\u0E49\u0E19\u0E02\u0E2D\u0E1A",
|
|
366
|
+
"echarts.panel.label.borderWidth": "\u0E04\u0E27\u0E32\u0E21\u0E01\u0E27\u0E49\u0E32\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E02\u0E2D\u0E1A",
|
|
367
|
+
"echarts.panel.label.borderRadius": "\u0E23\u0E31\u0E28\u0E21\u0E35",
|
|
368
|
+
"echarts.panel.label.padding": "\u0E23\u0E30\u0E22\u0E30\u0E20\u0E32\u0E22\u0E43\u0E19",
|
|
369
|
+
"echarts.panel.label.show": "\u0E41\u0E2A\u0E14\u0E07\u0E1B\u0E49\u0E32\u0E22\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
370
|
+
"echarts.panel.label.content": "\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32",
|
|
371
|
+
"echarts.panel.label.formatterTitle": "\u0E40\u0E19\u0E37\u0E49\u0E2D\u0E2B\u0E32\u0E1B\u0E49\u0E32\u0E22\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
372
|
+
"echarts.panel.label.formatterCustom": "\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E40\u0E2D\u0E07 / \u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
|
|
373
|
+
"echarts.panel.label.formatterPlaceholder": "\u0E40\u0E0A\u0E48\u0E19 {b}: {c}",
|
|
374
|
+
"echarts.panel.label.overflow": "\u0E25\u0E49\u0E19",
|
|
375
|
+
"echarts.panel.label.position": "\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07",
|
|
376
|
+
"echarts.panel.label.positionTitle": "\u0E15\u0E33\u0E41\u0E2B\u0E19\u0E48\u0E07\u0E1B\u0E49\u0E32\u0E22",
|
|
377
|
+
"echarts.panel.label.positionDefault": "\u0E04\u0E48\u0E32\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
|
|
378
|
+
"echarts.panel.label.offset": "\u0E2D\u0E2D\u0E1F\u0E40\u0E0B\u0E47\u0E15 X / Y",
|
|
379
|
+
"echarts.panel.label.style": "\u0E2A\u0E44\u0E15\u0E25\u0E4C",
|
|
380
|
+
"echarts.panel.labelLine.fontWeight": "\u0E19\u0E49\u0E33\u0E2B\u0E19\u0E31\u0E01\u0E1F\u0E2D\u0E19\u0E15\u0E4C",
|
|
381
|
+
"echarts.panel.labelLine": "\u0E40\u0E2A\u0E49\u0E19\u0E1B\u0E49\u0E32\u0E22",
|
|
382
|
+
"echarts.panel.labelLine.show": "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E1B\u0E49\u0E32\u0E22",
|
|
383
|
+
"echarts.panel.labelLine.length": "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E40\u0E2A\u0E49\u0E19\u0E1B\u0E49\u0E32\u0E22",
|
|
384
|
+
"echarts.panel.labelLine.length2": "\u0E04\u0E27\u0E32\u0E21\u0E22\u0E32\u0E27\u0E17\u0E48\u0E2D\u0E19\u0E17\u0E35\u0E48\u0E2A\u0E2D\u0E07",
|
|
385
|
+
"echarts.panel.labelLine.smooth": "\u0E40\u0E2A\u0E49\u0E19\u0E1B\u0E49\u0E32\u0E22\u0E42\u0E04\u0E49\u0E07",
|
|
386
|
+
"echarts.panel.dataSourceTitle": "\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
387
|
+
"echarts.panel.categoryField": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48",
|
|
388
|
+
"echarts.panel.removeField": "\u0E25\u0E1A\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E19\u0E35\u0E49",
|
|
389
|
+
"echarts.panel.addField": "+ \u0E40\u0E1E\u0E34\u0E48\u0E21\u0E1F\u0E34\u0E25\u0E14\u0E4C",
|
|
390
|
+
"echarts.panel.seriesField": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E41\u0E22\u0E01\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
391
|
+
"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)",
|
|
392
|
+
"echarts.panel.bubbleSize": "\u0E02\u0E19\u0E32\u0E14\u0E1F\u0E2D\u0E07",
|
|
393
|
+
"echarts.panel.title": "\u0E0A\u0E37\u0E48\u0E2D\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
|
|
394
|
+
"echarts.panel.titleHint": "\u0E40\u0E27\u0E49\u0E19\u0E27\u0E48\u0E32\u0E07\u0E40\u0E1E\u0E37\u0E48\u0E2D\u0E0B\u0E48\u0E2D\u0E19\u0E0A\u0E37\u0E48\u0E2D",
|
|
395
|
+
"echarts.panel.legend": "\u0E41\u0E2A\u0E14\u0E07\u0E04\u0E33\u0E2D\u0E18\u0E34\u0E1A\u0E32\u0E22",
|
|
396
|
+
"echarts.panel.palette": "\u0E0A\u0E38\u0E14\u0E2A\u0E35",
|
|
397
|
+
"echarts.palette.default": "\u0E2A\u0E35\u0E19\u0E49\u0E33\u0E40\u0E07\u0E34\u0E19\u0E40\u0E23\u0E34\u0E48\u0E21\u0E15\u0E49\u0E19",
|
|
398
|
+
"echarts.palette.fresh": "\u0E2A\u0E35\u0E40\u0E02\u0E35\u0E22\u0E27\u0E2A\u0E14\u0E0A\u0E37\u0E48\u0E19",
|
|
399
|
+
"echarts.palette.warm": "\u0E2A\u0E35\u0E2A\u0E49\u0E21\u0E41\u0E14\u0E07\u0E2D\u0E1A\u0E2D\u0E38\u0E48\u0E19",
|
|
400
|
+
"echarts.palette.purple": "\u0E2A\u0E35\u0E21\u0E39\u0E1F\u0E40\u0E17\u0E32",
|
|
401
|
+
"echarts.panel.stack": "\u0E0B\u0E49\u0E2D\u0E19\u0E01\u0E31\u0E19",
|
|
402
|
+
"echarts.panel.innerRadius": "\u0E23\u0E31\u0E28\u0E21\u0E35\u0E43\u0E19 (%)",
|
|
403
|
+
"echarts.panel.paddingTRBL": "\u0E23\u0E30\u0E22\u0E30\u0E1A\u0E19/\u0E02\u0E27\u0E32/\u0E25\u0E48\u0E32\u0E07/\u0E0B\u0E49\u0E32\u0E22 (%)",
|
|
404
|
+
"echarts.panel.paddingTop": "\u0E23\u0E30\u0E22\u0E30\u0E1A\u0E19",
|
|
405
|
+
"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)",
|
|
406
|
+
"echarts.panel.paddingBottom": "\u0E23\u0E30\u0E22\u0E30\u0E25\u0E48\u0E32\u0E07",
|
|
407
|
+
"echarts.panel.paddingLeft": "\u0E23\u0E30\u0E22\u0E30\u0E0B\u0E49\u0E32\u0E22",
|
|
408
|
+
"echarts.panel.radius": "\u0E23\u0E31\u0E28\u0E21\u0E35 (%)",
|
|
409
|
+
"echarts.panel.minMax": "\u0E15\u0E48\u0E33\u0E2A\u0E38\u0E14 / \u0E2A\u0E39\u0E07\u0E2A\u0E38\u0E14",
|
|
410
|
+
"echarts.panel.group": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
|
|
411
|
+
"echarts.series.typeNames.bar": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E41\u0E17\u0E48\u0E07",
|
|
412
|
+
"echarts.series.typeNames.barH": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E41\u0E17\u0E48\u0E07\u0E41\u0E19\u0E27\u0E19\u0E2D\u0E19",
|
|
413
|
+
"echarts.series.typeNames.line": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E2A\u0E49\u0E19",
|
|
414
|
+
"echarts.series.typeNames.area": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E1E\u0E37\u0E49\u0E19\u0E17\u0E35\u0E48",
|
|
415
|
+
"echarts.series.typeNames.pie": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E27\u0E07\u0E01\u0E25\u0E21",
|
|
416
|
+
"echarts.series.typeNames.doughnut": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E27\u0E07\u0E01\u0E25\u0E21\u0E27\u0E07\u0E41\u0E2B\u0E27\u0E19",
|
|
417
|
+
"echarts.series.typeNames.scatter": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E01\u0E23\u0E30\u0E08\u0E32\u0E22",
|
|
418
|
+
"echarts.series.typeNames.radar": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E23\u0E14\u0E32\u0E23\u0E4C",
|
|
419
|
+
"echarts.series.typeNames.funnel": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E0A\u0E48\u0E2D\u0E07\u0E17\u0E32\u0E07",
|
|
420
|
+
"echarts.series.typeNames.gauge": "\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34\u0E40\u0E01\u0E08\u0E27\u0E31\u0E14",
|
|
421
|
+
"echarts.label.formatter.value": "\u0E04\u0E48\u0E32",
|
|
422
|
+
"echarts.label.formatter.nameValue": "\u0E0A\u0E37\u0E48\u0E2D: \u0E04\u0E48\u0E32",
|
|
423
|
+
"echarts.label.formatter.name": "\u0E0A\u0E37\u0E48\u0E2D",
|
|
424
|
+
"echarts.label.formatter.percent": "\u0E40\u0E1B\u0E2D\u0E23\u0E4C\u0E40\u0E0B\u0E47\u0E19\u0E15\u0E4C",
|
|
425
|
+
"echarts.label.position.bar.top": "\u0E1A\u0E19",
|
|
426
|
+
"echarts.label.position.bar.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
|
|
427
|
+
"echarts.label.position.bar.insideTop": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19\u0E1A\u0E19",
|
|
428
|
+
"echarts.label.position.bar.bottom": "\u0E25\u0E48\u0E32\u0E07",
|
|
429
|
+
"echarts.label.position.bar.insideBottom": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19\u0E25\u0E48\u0E32\u0E07",
|
|
430
|
+
"echarts.label.position.bar.right": "\u0E02\u0E27\u0E32",
|
|
431
|
+
"echarts.label.position.bar.left": "\u0E0B\u0E49\u0E32\u0E22",
|
|
432
|
+
"echarts.label.position.bar.middle": "\u0E01\u0E25\u0E32\u0E07",
|
|
433
|
+
"echarts.label.position.line.top": "\u0E1A\u0E19",
|
|
434
|
+
"echarts.label.position.line.bottom": "\u0E25\u0E48\u0E32\u0E07",
|
|
435
|
+
"echarts.label.position.line.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
|
|
436
|
+
"echarts.label.position.line.left": "\u0E0B\u0E49\u0E32\u0E22",
|
|
437
|
+
"echarts.label.position.line.right": "\u0E02\u0E27\u0E32",
|
|
438
|
+
"echarts.label.position.pie.outside": "\u0E14\u0E49\u0E32\u0E19\u0E19\u0E2D\u0E01",
|
|
439
|
+
"echarts.label.position.pie.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
|
|
440
|
+
"echarts.label.position.pie.center": "\u0E01\u0E25\u0E32\u0E07",
|
|
441
|
+
"echarts.label.position.scatter.top": "\u0E1A\u0E19",
|
|
442
|
+
"echarts.label.position.scatter.bottom": "\u0E25\u0E48\u0E32\u0E07",
|
|
443
|
+
"echarts.label.position.scatter.left": "\u0E0B\u0E49\u0E32\u0E22",
|
|
444
|
+
"echarts.label.position.scatter.right": "\u0E02\u0E27\u0E32",
|
|
445
|
+
"echarts.label.position.scatter.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
|
|
446
|
+
"echarts.label.position.radar.top": "\u0E1A\u0E19",
|
|
447
|
+
"echarts.label.position.radar.bottom": "\u0E25\u0E48\u0E32\u0E07",
|
|
448
|
+
"echarts.label.position.radar.left": "\u0E0B\u0E49\u0E32\u0E22",
|
|
449
|
+
"echarts.label.position.radar.right": "\u0E02\u0E27\u0E32",
|
|
450
|
+
"echarts.label.position.radar.inside": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
|
|
451
|
+
"echarts.label.position.funnel.outer": "\u0E14\u0E49\u0E32\u0E19\u0E19\u0E2D\u0E01",
|
|
452
|
+
"echarts.label.position.funnel.inner": "\u0E14\u0E49\u0E32\u0E19\u0E43\u0E19",
|
|
453
|
+
"echarts.label.position.funnel.left": "\u0E0B\u0E49\u0E32\u0E22",
|
|
454
|
+
"echarts.label.position.funnel.right": "\u0E02\u0E27\u0E32",
|
|
455
|
+
"echarts.label.position.funnel.top": "\u0E1A\u0E19",
|
|
456
|
+
"echarts.label.position.funnel.bottom": "\u0E25\u0E48\u0E32\u0E07",
|
|
457
|
+
"echarts.meta.chartOption": "\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E41\u0E1C\u0E19\u0E20\u0E39\u0E21\u0E34",
|
|
458
|
+
"echarts.meta.dataSource": "\u0E41\u0E2B\u0E25\u0E48\u0E07\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
459
|
+
"echarts.meta.categoryField": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E2B\u0E21\u0E27\u0E14\u0E2B\u0E21\u0E39\u0E48",
|
|
460
|
+
"echarts.meta.valueFields": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E04\u0E48\u0E32",
|
|
461
|
+
"echarts.meta.seriesField": "\u0E1F\u0E34\u0E25\u0E14\u0E4C\u0E41\u0E22\u0E01\u0E0A\u0E38\u0E14\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
|
|
462
|
+
"echarts.meta.bubbleSize": "\u0E02\u0E19\u0E32\u0E14\u0E1F\u0E2D\u0E07",
|
|
463
|
+
"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",
|
|
464
|
+
"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",
|
|
465
|
+
"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",
|
|
466
|
+
"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",
|
|
467
|
+
"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",
|
|
468
|
+
"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",
|
|
469
|
+
"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",
|
|
470
|
+
"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)",
|
|
471
|
+
"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)",
|
|
472
|
+
"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"
|
|
473
|
+
}
|
|
474
|
+
};
|
|
475
|
+
|
|
8
476
|
// src/ui.ts
|
|
9
477
|
import { defineElementUI, registerElementUI } from "@worm-print-platform/plugin-kit";
|
|
10
478
|
import { render } from "@worm-print-platform/plugin-kit/dom";
|
|
11
479
|
import { colorPicker } from "@worm-print-platform/plugin-kit/controls";
|
|
12
480
|
|
|
13
481
|
// src/plugin.ts
|
|
482
|
+
import { t } from "@worm-print-platform/core/i18n";
|
|
14
483
|
import {
|
|
15
484
|
defineElementPlugin,
|
|
16
485
|
getElementPluginById,
|
|
@@ -25,6 +494,7 @@ var CHART_KIND_DEFINITIONS = [
|
|
|
25
494
|
{
|
|
26
495
|
type: "barChart",
|
|
27
496
|
label: "\u67F1\u72B6\u56FE",
|
|
497
|
+
labelKey: "echarts.series.typeNames.bar",
|
|
28
498
|
icon: "ChartColumn",
|
|
29
499
|
seriesType: "bar",
|
|
30
500
|
orientation: "vertical",
|
|
@@ -32,11 +502,13 @@ var CHART_KIND_DEFINITIONS = [
|
|
|
32
502
|
requiredOptionKeys: BASE_REQUIRED,
|
|
33
503
|
defaultWidth: 100,
|
|
34
504
|
defaultHeight: 60,
|
|
35
|
-
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"
|
|
505
|
+
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",
|
|
506
|
+
notesKey: "echarts.notes.bar"
|
|
36
507
|
},
|
|
37
508
|
{
|
|
38
509
|
type: "barHChart",
|
|
39
510
|
label: "\u6761\u5F62\u56FE",
|
|
511
|
+
labelKey: "echarts.series.typeNames.barH",
|
|
40
512
|
icon: "ChartBar",
|
|
41
513
|
seriesType: "bar",
|
|
42
514
|
orientation: "horizontal",
|
|
@@ -44,95 +516,112 @@ var CHART_KIND_DEFINITIONS = [
|
|
|
44
516
|
requiredOptionKeys: BASE_REQUIRED,
|
|
45
517
|
defaultWidth: 100,
|
|
46
518
|
defaultHeight: 60,
|
|
47
|
-
notes: "\u6A2A\u5411\u6761\u5F62\u56FE\uFF1AxAxis \u4E3A\u6570\u503C\u3001yAxis \u4E3A\u7C7B\u76EE\uFF1B\u7C7B\u76EE\u5199 yAxis.data \u7684 $data \u5360\u4F4D"
|
|
519
|
+
notes: "\u6A2A\u5411\u6761\u5F62\u56FE\uFF1AxAxis \u4E3A\u6570\u503C\u3001yAxis \u4E3A\u7C7B\u76EE\uFF1B\u7C7B\u76EE\u5199 yAxis.data \u7684 $data \u5360\u4F4D",
|
|
520
|
+
notesKey: "echarts.notes.barH"
|
|
48
521
|
},
|
|
49
522
|
{
|
|
50
523
|
type: "lineChart",
|
|
51
524
|
label: "\u6298\u7EBF\u56FE",
|
|
525
|
+
labelKey: "echarts.series.typeNames.line",
|
|
52
526
|
icon: "ChartLine",
|
|
53
527
|
seriesType: "line",
|
|
54
528
|
fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack", "label"],
|
|
55
529
|
requiredOptionKeys: BASE_REQUIRED,
|
|
56
530
|
defaultWidth: 100,
|
|
57
531
|
defaultHeight: 60,
|
|
58
|
-
notes: "\u6298\u7EBF\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF1B\u4E0D\u5199 areaStyle"
|
|
532
|
+
notes: "\u6298\u7EBF\u56FE\uFF1A\u7C7B\u76EE + \u591A\u4E2A\u6570\u503C\u5B57\u6BB5\uFF1B\u4E0D\u5199 areaStyle",
|
|
533
|
+
notesKey: "echarts.notes.line"
|
|
59
534
|
},
|
|
60
535
|
{
|
|
61
536
|
type: "areaChart",
|
|
62
537
|
label: "\u9762\u79EF\u56FE",
|
|
538
|
+
labelKey: "echarts.series.typeNames.area",
|
|
63
539
|
icon: "ChartArea",
|
|
64
540
|
seriesType: "line",
|
|
65
541
|
fields: [...DATA_FIELDS, ...STYLE_FIELDS, "stack", "label"],
|
|
66
542
|
requiredOptionKeys: BASE_REQUIRED,
|
|
67
543
|
defaultWidth: 100,
|
|
68
544
|
defaultHeight: 60,
|
|
69
|
-
notes: "\u9762\u79EF\u56FE\uFF1A\u6298\u7EBF + series[].areaStyle\uFF1B\u5176\u4F59\u540C\u6298\u7EBF\u56FE"
|
|
545
|
+
notes: "\u9762\u79EF\u56FE\uFF1A\u6298\u7EBF + series[].areaStyle\uFF1B\u5176\u4F59\u540C\u6298\u7EBF\u56FE",
|
|
546
|
+
notesKey: "echarts.notes.area"
|
|
70
547
|
},
|
|
71
548
|
{
|
|
72
549
|
type: "pieChart",
|
|
73
550
|
label: "\u997C\u56FE",
|
|
551
|
+
labelKey: "echarts.series.typeNames.pie",
|
|
74
552
|
icon: "ChartPie",
|
|
75
553
|
seriesType: "pie",
|
|
76
554
|
fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "label"],
|
|
77
555
|
requiredOptionKeys: BASE_REQUIRED,
|
|
78
556
|
defaultWidth: 60,
|
|
79
557
|
defaultHeight: 60,
|
|
80
|
-
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"
|
|
558
|
+
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",
|
|
559
|
+
notesKey: "echarts.notes.pie"
|
|
81
560
|
},
|
|
82
561
|
{
|
|
83
562
|
type: "doughnutChart",
|
|
84
563
|
label: "\u73AF\u5F62\u56FE",
|
|
564
|
+
labelKey: "echarts.series.typeNames.doughnut",
|
|
85
565
|
icon: "Donut",
|
|
86
566
|
seriesType: "pie",
|
|
87
567
|
fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "innerRadius", "label"],
|
|
88
568
|
requiredOptionKeys: BASE_REQUIRED,
|
|
89
569
|
defaultWidth: 60,
|
|
90
570
|
defaultHeight: 60,
|
|
91
|
-
notes: "\u73AF\u5F62\u56FE\uFF1A\u997C\u56FE + radius:[\u5185\u5F84,\u5916\u5F84]\uFF1B\u5185\u5F84\u7531\u9762\u677F\u914D\u7F6E"
|
|
571
|
+
notes: "\u73AF\u5F62\u56FE\uFF1A\u997C\u56FE + radius:[\u5185\u5F84,\u5916\u5F84]\uFF1B\u5185\u5F84\u7531\u9762\u677F\u914D\u7F6E",
|
|
572
|
+
notesKey: "echarts.notes.doughnut"
|
|
92
573
|
},
|
|
93
574
|
{
|
|
94
575
|
type: "scatterChart",
|
|
95
576
|
label: "\u6563\u70B9\u56FE",
|
|
577
|
+
labelKey: "echarts.series.typeNames.scatter",
|
|
96
578
|
icon: "ChartScatter",
|
|
97
579
|
seriesType: "scatter",
|
|
98
580
|
fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "bubble", "label"],
|
|
99
581
|
requiredOptionKeys: BASE_REQUIRED,
|
|
100
582
|
defaultWidth: 80,
|
|
101
583
|
defaultHeight: 60,
|
|
102
|
-
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"
|
|
584
|
+
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",
|
|
585
|
+
notesKey: "echarts.notes.scatter"
|
|
103
586
|
},
|
|
104
587
|
{
|
|
105
588
|
type: "radarChart",
|
|
106
589
|
label: "\u96F7\u8FBE\u56FE",
|
|
590
|
+
labelKey: "echarts.series.typeNames.radar",
|
|
107
591
|
icon: "Radar",
|
|
108
592
|
seriesType: "radar",
|
|
109
593
|
fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "radius", "label"],
|
|
110
594
|
requiredOptionKeys: BASE_REQUIRED,
|
|
111
595
|
defaultWidth: 70,
|
|
112
596
|
defaultHeight: 60,
|
|
113
|
-
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"
|
|
597
|
+
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",
|
|
598
|
+
notesKey: "echarts.notes.radar"
|
|
114
599
|
},
|
|
115
600
|
{
|
|
116
601
|
type: "funnelChart",
|
|
117
602
|
label: "\u6F0F\u6597\u56FE",
|
|
603
|
+
labelKey: "echarts.series.typeNames.funnel",
|
|
118
604
|
icon: "Funnel",
|
|
119
605
|
seriesType: "funnel",
|
|
120
606
|
fields: ["dataSource", "categoryField", "valueFields", ...STYLE_FIELDS, "padding", "label"],
|
|
121
607
|
requiredOptionKeys: BASE_REQUIRED,
|
|
122
608
|
defaultWidth: 60,
|
|
123
609
|
defaultHeight: 60,
|
|
124
|
-
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"
|
|
610
|
+
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",
|
|
611
|
+
notesKey: "echarts.notes.funnel"
|
|
125
612
|
},
|
|
126
613
|
{
|
|
127
614
|
type: "gaugeChart",
|
|
128
615
|
label: "\u4EEA\u8868\u76D8",
|
|
616
|
+
labelKey: "echarts.series.typeNames.gauge",
|
|
129
617
|
icon: "Gauge",
|
|
130
618
|
seriesType: "gauge",
|
|
131
619
|
fields: ["dataSource", "valueFields", ...STYLE_FIELDS, "gaugeRange", "label"],
|
|
132
620
|
requiredOptionKeys: BASE_REQUIRED,
|
|
133
621
|
defaultWidth: 60,
|
|
134
622
|
defaultHeight: 60,
|
|
135
|
-
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"
|
|
623
|
+
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",
|
|
624
|
+
notesKey: "echarts.notes.gauge"
|
|
136
625
|
}
|
|
137
626
|
];
|
|
138
627
|
var CHART_KINDS = CHART_KIND_DEFINITIONS.map((def) => def.type);
|
|
@@ -328,10 +817,10 @@ import { configurePlugin, getPluginConfig } from "@worm-print-platform/core/desi
|
|
|
328
817
|
// src/constants.ts
|
|
329
818
|
var CHART_PLUGIN_ID = "@worm-print-platform/echarts";
|
|
330
819
|
var CHART_PALETTES = [
|
|
331
|
-
{ key: "default", label: "\u9ED8\u8BA4\u84DD", colors: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de"] },
|
|
332
|
-
{ key: "fresh", label: "\u6E05\u65B0\u7EFF", colors: ["#2f9e6e", "#5cc9a7", "#9ad6c1", "#f2c94c", "#4a90e2"] },
|
|
333
|
-
{ key: "warm", label: "\u6696\u6A59\u7EA2", colors: ["#f2704e", "#f7a35c", "#f7d56d", "#c54e3f", "#8f5a4a"] },
|
|
334
|
-
{ key: "purple", label: "\u7D2B\u7070", colors: ["#7b61ff", "#9b8cff", "#c3baff", "#596275", "#8d99ae"] }
|
|
820
|
+
{ key: "default", label: "\u9ED8\u8BA4\u84DD", labelKey: "echarts.palette.default", colors: ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de"] },
|
|
821
|
+
{ key: "fresh", label: "\u6E05\u65B0\u7EFF", labelKey: "echarts.palette.fresh", colors: ["#2f9e6e", "#5cc9a7", "#9ad6c1", "#f2c94c", "#4a90e2"] },
|
|
822
|
+
{ key: "warm", label: "\u6696\u6A59\u7EA2", labelKey: "echarts.palette.warm", colors: ["#f2704e", "#f7a35c", "#f7d56d", "#c54e3f", "#8f5a4a"] },
|
|
823
|
+
{ key: "purple", label: "\u7D2B\u7070", labelKey: "echarts.palette.purple", colors: ["#7b61ff", "#9b8cff", "#c3baff", "#596275", "#8d99ae"] }
|
|
335
824
|
];
|
|
336
825
|
var FALLBACK_SAMPLE_CATEGORIES = ["\u793A\u4F8B\u4E00", "\u793A\u4F8B\u4E8C", "\u793A\u4F8B\u4E09"];
|
|
337
826
|
var FUNNEL_PADDING_DEFAULTS = { top: 6, right: 25, bottom: 6, left: 5 };
|
|
@@ -419,7 +908,7 @@ function getChartPalettes() {
|
|
|
419
908
|
const overrides = getChartPluginConfig().palettes ?? {};
|
|
420
909
|
const builtin = CHART_PALETTES.map((palette) => {
|
|
421
910
|
const custom = overrides[palette.key];
|
|
422
|
-
return custom ? { key: palette.key, label: custom.label ?? palette.label, colors: custom.colors } : { key: palette.key, label: palette.label, colors: palette.colors };
|
|
911
|
+
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 };
|
|
423
912
|
});
|
|
424
913
|
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 }));
|
|
425
914
|
return [...builtin, ...extra];
|
|
@@ -632,55 +1121,55 @@ function writeRadarRadius(option, percent) {
|
|
|
632
1121
|
|
|
633
1122
|
// src/label.ts
|
|
634
1123
|
var LABEL_PRESETS = [
|
|
635
|
-
{ key: "value", label: "\u6570\u503C", formatter: "{c}" },
|
|
636
|
-
{ key: "name-value", label: "\u540D\u79F0: \u6570\u503C", formatter: "{b}: {c}" },
|
|
637
|
-
{ key: "name", label: "\u540D\u79F0", formatter: "{b}" },
|
|
638
|
-
{ key: "percent", label: "\u767E\u5206\u6BD4", formatter: "{d}%" }
|
|
1124
|
+
{ key: "value", label: "\u6570\u503C", labelKey: "echarts.label.formatter.value", formatter: "{c}" },
|
|
1125
|
+
{ key: "name-value", label: "\u540D\u79F0: \u6570\u503C", labelKey: "echarts.label.formatter.nameValue", formatter: "{b}: {c}" },
|
|
1126
|
+
{ key: "name", label: "\u540D\u79F0", labelKey: "echarts.label.formatter.name", formatter: "{b}" },
|
|
1127
|
+
{ key: "percent", label: "\u767E\u5206\u6BD4", labelKey: "echarts.label.formatter.percent", formatter: "{d}%" }
|
|
639
1128
|
];
|
|
640
1129
|
var LABEL_POSITIONS = {
|
|
641
1130
|
bar: [
|
|
642
|
-
{ value: "top", label: "\u9876\u90E8" },
|
|
643
|
-
{ value: "inside", label: "\u5185\u90E8" },
|
|
644
|
-
{ value: "insideTop", label: "\u5185\u90E8\u9876\u7AEF" },
|
|
645
|
-
{ value: "bottom", label: "\u5E95\u90E8" },
|
|
646
|
-
{ value: "insideBottom", label: "\u5185\u90E8\u5E95\u7AEF" },
|
|
647
|
-
{ value: "right", label: "\u53F3\u4FA7" },
|
|
648
|
-
{ value: "left", label: "\u5DE6\u4FA7" },
|
|
649
|
-
{ value: "middle", label: "\u5C45\u4E2D" }
|
|
1131
|
+
{ value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.bar.top" },
|
|
1132
|
+
{ value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.bar.inside" },
|
|
1133
|
+
{ value: "insideTop", label: "\u5185\u90E8\u9876\u7AEF", labelKey: "echarts.label.position.bar.insideTop" },
|
|
1134
|
+
{ value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.bar.bottom" },
|
|
1135
|
+
{ value: "insideBottom", label: "\u5185\u90E8\u5E95\u7AEF", labelKey: "echarts.label.position.bar.insideBottom" },
|
|
1136
|
+
{ value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.bar.right" },
|
|
1137
|
+
{ value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.bar.left" },
|
|
1138
|
+
{ value: "middle", label: "\u5C45\u4E2D", labelKey: "echarts.label.position.bar.middle" }
|
|
650
1139
|
],
|
|
651
1140
|
line: [
|
|
652
|
-
{ value: "top", label: "\u9876\u90E8" },
|
|
653
|
-
{ value: "bottom", label: "\u5E95\u90E8" },
|
|
654
|
-
{ value: "inside", label: "\u5185\u90E8" },
|
|
655
|
-
{ value: "left", label: "\u5DE6\u4FA7" },
|
|
656
|
-
{ value: "right", label: "\u53F3\u4FA7" }
|
|
1141
|
+
{ value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.line.top" },
|
|
1142
|
+
{ value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.line.bottom" },
|
|
1143
|
+
{ value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.line.inside" },
|
|
1144
|
+
{ value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.line.left" },
|
|
1145
|
+
{ value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.line.right" }
|
|
657
1146
|
],
|
|
658
1147
|
pie: [
|
|
659
|
-
{ value: "outside", label: "\u5916\u4FA7" },
|
|
660
|
-
{ value: "inside", label: "\u5185\u90E8" },
|
|
661
|
-
{ value: "center", label: "\u4E2D\u5FC3" }
|
|
1148
|
+
{ value: "outside", label: "\u5916\u4FA7", labelKey: "echarts.label.position.pie.outside" },
|
|
1149
|
+
{ value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.pie.inside" },
|
|
1150
|
+
{ value: "center", label: "\u4E2D\u5FC3", labelKey: "echarts.label.position.pie.center" }
|
|
662
1151
|
],
|
|
663
1152
|
scatter: [
|
|
664
|
-
{ value: "top", label: "\u9876\u90E8" },
|
|
665
|
-
{ value: "bottom", label: "\u5E95\u90E8" },
|
|
666
|
-
{ value: "left", label: "\u5DE6\u4FA7" },
|
|
667
|
-
{ value: "right", label: "\u53F3\u4FA7" },
|
|
668
|
-
{ value: "inside", label: "\u5185\u90E8" }
|
|
1153
|
+
{ value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.scatter.top" },
|
|
1154
|
+
{ value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.scatter.bottom" },
|
|
1155
|
+
{ value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.scatter.left" },
|
|
1156
|
+
{ value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.scatter.right" },
|
|
1157
|
+
{ value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.scatter.inside" }
|
|
669
1158
|
],
|
|
670
1159
|
radar: [
|
|
671
|
-
{ value: "top", label: "\u9876\u90E8" },
|
|
672
|
-
{ value: "bottom", label: "\u5E95\u90E8" },
|
|
673
|
-
{ value: "left", label: "\u5DE6\u4FA7" },
|
|
674
|
-
{ value: "right", label: "\u53F3\u4FA7" },
|
|
675
|
-
{ value: "inside", label: "\u5185\u90E8" }
|
|
1160
|
+
{ value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.radar.top" },
|
|
1161
|
+
{ value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.radar.bottom" },
|
|
1162
|
+
{ value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.radar.left" },
|
|
1163
|
+
{ value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.radar.right" },
|
|
1164
|
+
{ value: "inside", label: "\u5185\u90E8", labelKey: "echarts.label.position.radar.inside" }
|
|
676
1165
|
],
|
|
677
1166
|
funnel: [
|
|
678
|
-
{ value: "outer", label: "\u5916\u4FA7" },
|
|
679
|
-
{ value: "inner", label: "\u5185\u90E8" },
|
|
680
|
-
{ value: "left", label: "\u5DE6\u4FA7" },
|
|
681
|
-
{ value: "right", label: "\u53F3\u4FA7" },
|
|
682
|
-
{ value: "top", label: "\u9876\u90E8" },
|
|
683
|
-
{ value: "bottom", label: "\u5E95\u90E8" }
|
|
1167
|
+
{ value: "outer", label: "\u5916\u4FA7", labelKey: "echarts.label.position.funnel.outer" },
|
|
1168
|
+
{ value: "inner", label: "\u5185\u90E8", labelKey: "echarts.label.position.funnel.inner" },
|
|
1169
|
+
{ value: "left", label: "\u5DE6\u4FA7", labelKey: "echarts.label.position.funnel.left" },
|
|
1170
|
+
{ value: "right", label: "\u53F3\u4FA7", labelKey: "echarts.label.position.funnel.right" },
|
|
1171
|
+
{ value: "top", label: "\u9876\u90E8", labelKey: "echarts.label.position.funnel.top" },
|
|
1172
|
+
{ value: "bottom", label: "\u5E95\u90E8", labelKey: "echarts.label.position.funnel.bottom" }
|
|
684
1173
|
],
|
|
685
1174
|
gauge: []
|
|
686
1175
|
};
|
|
@@ -1031,26 +1520,32 @@ var CHART_EXECUTOR_VERSION = "2";
|
|
|
1031
1520
|
|
|
1032
1521
|
// src/plugin.ts
|
|
1033
1522
|
var CHART_OPTION_META = {
|
|
1034
|
-
chartOption: { kind: "object", label: "
|
|
1035
|
-
chartDataSource: { kind: "text", label: "
|
|
1036
|
-
chartCategoryField: { kind: "text", label: "
|
|
1037
|
-
chartValueFields: { kind: "object", label: "
|
|
1038
|
-
chartSeriesField: { kind: "text", label: "
|
|
1523
|
+
chartOption: { kind: "object", label: t("echarts.meta.chartOption") },
|
|
1524
|
+
chartDataSource: { kind: "text", label: t("echarts.meta.dataSource") },
|
|
1525
|
+
chartCategoryField: { kind: "text", label: t("echarts.meta.categoryField") },
|
|
1526
|
+
chartValueFields: { kind: "object", label: t("echarts.meta.valueFields") },
|
|
1527
|
+
chartSeriesField: { kind: "text", label: t("echarts.meta.seriesField") }
|
|
1039
1528
|
};
|
|
1040
1529
|
var SCATTER_OPTION_META = {
|
|
1041
1530
|
...CHART_OPTION_META,
|
|
1042
|
-
chartBubble: { kind: "bool", label: "
|
|
1531
|
+
chartBubble: { kind: "bool", label: t("echarts.meta.bubbleSize") }
|
|
1043
1532
|
};
|
|
1044
1533
|
var CHART_PLUGIN = defineElementPlugin({
|
|
1045
1534
|
id: CHART_PLUGIN_ID,
|
|
1046
1535
|
version: CHART_EXECUTOR_VERSION,
|
|
1047
1536
|
kinds: CHART_KIND_DEFINITIONS.map((def) => ({
|
|
1048
1537
|
type: def.type,
|
|
1049
|
-
|
|
1538
|
+
// getter:每次读取按当前实例语言取词,避免模块加载期冻结为单一语言
|
|
1539
|
+
get label() {
|
|
1540
|
+
return t(def.labelKey);
|
|
1541
|
+
},
|
|
1050
1542
|
icon: def.icon,
|
|
1051
1543
|
fixedHeight: true,
|
|
1052
1544
|
requiredOptionKeys: def.requiredOptionKeys,
|
|
1053
|
-
|
|
1545
|
+
// getter:每次读取按当前实例语言取词,避免模块加载期冻结为单一语言
|
|
1546
|
+
get notes() {
|
|
1547
|
+
return t(def.notesKey);
|
|
1548
|
+
},
|
|
1054
1549
|
optionMeta: def.type === "scatterChart" ? SCATTER_OPTION_META : CHART_OPTION_META,
|
|
1055
1550
|
defaultOptions: (partial) => chartFactoryDefaults(def.type, partial),
|
|
1056
1551
|
binding: { bind: (options, data) => bindChartData(def.type, options, data) }
|
|
@@ -1080,6 +1575,17 @@ function registerChartPlugin(designer, extraRender) {
|
|
|
1080
1575
|
registerChartPlugin();
|
|
1081
1576
|
|
|
1082
1577
|
// src/ui.ts
|
|
1578
|
+
var activeT = globalT;
|
|
1579
|
+
var t2 = (key, params) => activeT(key, params);
|
|
1580
|
+
function withTranslator(translator, render2) {
|
|
1581
|
+
const prev = activeT;
|
|
1582
|
+
activeT = translator ?? globalT;
|
|
1583
|
+
try {
|
|
1584
|
+
return render2();
|
|
1585
|
+
} finally {
|
|
1586
|
+
activeT = prev;
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1083
1589
|
var CANVAS_STYLE = "width:100%;height:100%;min-width:0;min-height:0;pointer-events:none";
|
|
1084
1590
|
var STYLES = [
|
|
1085
1591
|
".echarts-canvas-element{overflow:hidden}",
|
|
@@ -1132,7 +1638,7 @@ var SEARCH_KEYWORDS = [
|
|
|
1132
1638
|
"\u6570\u503C\u6807\u7B7E",
|
|
1133
1639
|
"label"
|
|
1134
1640
|
];
|
|
1135
|
-
var
|
|
1641
|
+
var panelHint = () => t2("echarts.panel.hint.dataBinding");
|
|
1136
1642
|
function escapeHtml2(value) {
|
|
1137
1643
|
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1138
1644
|
}
|
|
@@ -1173,8 +1679,8 @@ function maxValueFields(def) {
|
|
|
1173
1679
|
}
|
|
1174
1680
|
}
|
|
1175
1681
|
function valueFieldsLabel(def, limit) {
|
|
1176
|
-
if (def?.seriesType === "radar") return "
|
|
1177
|
-
return limit === 1 ? "
|
|
1682
|
+
if (def?.seriesType === "radar") return t2("echarts.panel.field.dimension");
|
|
1683
|
+
return limit === 1 ? t2("echarts.panel.field.value") : t2("echarts.panel.field.valueMulti");
|
|
1178
1684
|
}
|
|
1179
1685
|
function dataSourceCandidates(data) {
|
|
1180
1686
|
const first = data?.[0];
|
|
@@ -1197,15 +1703,15 @@ function fieldLabelMap(fields) {
|
|
|
1197
1703
|
return map;
|
|
1198
1704
|
}
|
|
1199
1705
|
function optionLabel(value, labels, fallbackSuffix) {
|
|
1200
|
-
if (!value) return fallbackSuffix ?? "
|
|
1706
|
+
if (!value) return fallbackSuffix ?? t2("echarts.panel.default");
|
|
1201
1707
|
const name = labels.get(value);
|
|
1202
1708
|
const base = name ? `${name}\uFF08${value}\uFF09` : value;
|
|
1203
1709
|
return fallbackSuffix ? `${base}${fallbackSuffix}` : base;
|
|
1204
1710
|
}
|
|
1205
1711
|
function dropdownOptions(candidates, current, labels = /* @__PURE__ */ new Map()) {
|
|
1206
1712
|
const opts = candidates.map((value) => ({ value, label: optionLabel(value, labels) }));
|
|
1207
|
-
if (current && !candidates.includes(current)) opts.unshift({ value: current, label: optionLabel(current, labels, "
|
|
1208
|
-
if (!current) opts.unshift({ value: "", label: "
|
|
1713
|
+
if (current && !candidates.includes(current)) opts.unshift({ value: current, label: optionLabel(current, labels, t2("echarts.panel.current")) });
|
|
1714
|
+
if (!current) opts.unshift({ value: "", label: t2("echarts.panel.defaultFirstArray") });
|
|
1209
1715
|
return opts;
|
|
1210
1716
|
}
|
|
1211
1717
|
function seriesList(option) {
|
|
@@ -1232,12 +1738,12 @@ function renderCanvas(ctx) {
|
|
|
1232
1738
|
try {
|
|
1233
1739
|
const preview = previewChartOption(type, rawChartOption(element) ?? createDefaultChartOption(type));
|
|
1234
1740
|
const option = normalizeChartOption(type, preview);
|
|
1235
|
-
if (!option || typeof option !== "object" || Array.isArray(option)) throw new Error("
|
|
1741
|
+
if (!option || typeof option !== "object" || Array.isArray(option)) throw new Error(t2("echarts.panel.error.invalidOption"));
|
|
1236
1742
|
const fontFamily = typeof options.fontFamily === "string" && options.fontFamily ? options.fontFamily : void 0;
|
|
1237
1743
|
const svg = renderChartToSvg({ key: element.id, type, option, widthMm, heightMm, fontFamily });
|
|
1238
1744
|
return `<div class="echarts-canvas-element" style="${CANVAS_STYLE}">${svg}</div>`;
|
|
1239
1745
|
} catch {
|
|
1240
|
-
const title = typeof options.title === "string" && options.title.trim() ? options.title : getChartKindDefinition(type)?.label ?? "
|
|
1746
|
+
const title = typeof options.title === "string" && options.title.trim() ? options.title : getChartKindDefinition(type)?.label ?? t2("echarts.panel.chartFallback");
|
|
1241
1747
|
return `<div class="echarts-canvas-element" style="${CANVAS_STYLE}">${escapeHtml2(title)}</div>`;
|
|
1242
1748
|
}
|
|
1243
1749
|
}
|
|
@@ -1292,7 +1798,7 @@ function composedPathOf(ev) {
|
|
|
1292
1798
|
return composed.length ? composed : [ev.target];
|
|
1293
1799
|
}
|
|
1294
1800
|
function dropdownSelect(options, value, onCommit) {
|
|
1295
|
-
const current = options.find((item) => item.value === value) ?? { value, label: value || "
|
|
1801
|
+
const current = options.find((item) => item.value === value) ?? { value, label: value || t2("echarts.panel.optionDefault") };
|
|
1296
1802
|
const trigger = el("button", "echarts-dropdown-trigger");
|
|
1297
1803
|
trigger.type = "button";
|
|
1298
1804
|
trigger.setAttribute("aria-haspopup", "listbox");
|
|
@@ -1364,35 +1870,36 @@ function dropdownSelect(options, value, onCommit) {
|
|
|
1364
1870
|
});
|
|
1365
1871
|
return trigger;
|
|
1366
1872
|
}
|
|
1367
|
-
var
|
|
1368
|
-
{ value: "", label: "
|
|
1369
|
-
{ value: "none", label: "
|
|
1370
|
-
{ value: "truncate", label: "
|
|
1371
|
-
{ value: "break", label: "
|
|
1873
|
+
var overflowOptions = () => [
|
|
1874
|
+
{ value: "", label: t2("echarts.panel.overflow.default") },
|
|
1875
|
+
{ value: "none", label: t2("echarts.panel.overflow.none") },
|
|
1876
|
+
{ value: "truncate", label: t2("echarts.panel.overflow.truncate") },
|
|
1877
|
+
{ value: "break", label: t2("echarts.panel.overflow.break") }
|
|
1372
1878
|
];
|
|
1373
|
-
var
|
|
1374
|
-
{ value: "", label: "
|
|
1375
|
-
{ value: "normal", label: "
|
|
1376
|
-
{ value: "bold", label: "
|
|
1879
|
+
var fontWeightOptions = () => [
|
|
1880
|
+
{ value: "", label: t2("echarts.panel.fontWeight.default") },
|
|
1881
|
+
{ value: "normal", label: t2("echarts.panel.fontWeight.normal") },
|
|
1882
|
+
{ value: "bold", label: t2("echarts.panel.fontWeight.bold") }
|
|
1377
1883
|
];
|
|
1378
|
-
var
|
|
1379
|
-
distance: "
|
|
1380
|
-
rotate: "
|
|
1381
|
-
fontSize: "
|
|
1382
|
-
fontWeight: "
|
|
1383
|
-
color: "
|
|
1384
|
-
backgroundColor: "
|
|
1385
|
-
borderColor: "
|
|
1386
|
-
borderWidth: "
|
|
1387
|
-
borderRadius: "
|
|
1388
|
-
padding: "
|
|
1389
|
-
};
|
|
1884
|
+
var styleFieldLabels = () => ({
|
|
1885
|
+
distance: t2("echarts.panel.label.distance"),
|
|
1886
|
+
rotate: t2("echarts.panel.label.rotate"),
|
|
1887
|
+
fontSize: t2("echarts.panel.label.fontSize"),
|
|
1888
|
+
fontWeight: t2("echarts.panel.label.fontWeight"),
|
|
1889
|
+
color: t2("echarts.panel.label.color"),
|
|
1890
|
+
backgroundColor: t2("echarts.panel.label.backgroundColor"),
|
|
1891
|
+
borderColor: t2("echarts.panel.label.borderColor"),
|
|
1892
|
+
borderWidth: t2("echarts.panel.label.borderWidth"),
|
|
1893
|
+
borderRadius: t2("echarts.panel.label.borderRadius"),
|
|
1894
|
+
padding: t2("echarts.panel.label.padding")
|
|
1895
|
+
});
|
|
1390
1896
|
function renderLabelGroup(ctx, type) {
|
|
1391
1897
|
const element = ctx.element;
|
|
1392
1898
|
const def = getChartKindDefinition(type);
|
|
1393
1899
|
const fields = labelFieldsOf(type);
|
|
1394
1900
|
const has = (key) => fields.includes(key);
|
|
1395
1901
|
const state = readChartLabel(panelOption(element), type);
|
|
1902
|
+
const styleLabels = styleFieldLabels();
|
|
1396
1903
|
const commit = (patch) => {
|
|
1397
1904
|
commitOption(ctx, type, updateChartLabel(panelOption(element), type, patch));
|
|
1398
1905
|
};
|
|
@@ -1409,18 +1916,20 @@ function renderLabelGroup(ctx, type) {
|
|
|
1409
1916
|
commit({ labelLine: { [key]: value } });
|
|
1410
1917
|
};
|
|
1411
1918
|
const numberField = (key, value) => {
|
|
1412
|
-
const wrap = field(
|
|
1919
|
+
const wrap = field(styleLabels[key] ?? key);
|
|
1413
1920
|
wrap.appendChild(
|
|
1414
1921
|
textInput({ value: value === void 0 ? "" : String(value), type: "number" }, (raw) => commitNumber(key, raw))
|
|
1415
1922
|
);
|
|
1416
1923
|
return wrap;
|
|
1417
1924
|
};
|
|
1418
1925
|
const colorField = (key, value) => {
|
|
1419
|
-
const wrap = field(
|
|
1926
|
+
const wrap = field(styleLabels[key] ?? key);
|
|
1420
1927
|
const holder = el("span");
|
|
1421
1928
|
render(colorPicker({
|
|
1422
1929
|
value: value ?? "",
|
|
1423
|
-
title:
|
|
1930
|
+
title: styleLabels[key] ?? key,
|
|
1931
|
+
// 面板点击时才构建,届时候选渲染期 translator 已还原,必须固化 ctx.t
|
|
1932
|
+
translator: ctx.t,
|
|
1424
1933
|
onChange: (next) => commit({ [key]: next ?? "" })
|
|
1425
1934
|
}), holder);
|
|
1426
1935
|
wrap.appendChild(holder);
|
|
@@ -1429,39 +1938,39 @@ function renderLabelGroup(ctx, type) {
|
|
|
1429
1938
|
const group = el("details", "echarts-label-group");
|
|
1430
1939
|
group.open = state.show;
|
|
1431
1940
|
const summary = el("summary", "echarts-label-summary");
|
|
1432
|
-
const toggle = checkboxField("
|
|
1941
|
+
const toggle = checkboxField(t2("echarts.panel.label.show"), state.show, (checked) => commit({ enabled: checked }));
|
|
1433
1942
|
toggle.querySelector("input")?.addEventListener("click", (event) => event.stopPropagation());
|
|
1434
1943
|
summary.appendChild(toggle);
|
|
1435
1944
|
group.appendChild(summary);
|
|
1436
1945
|
if (has("formatter") || has("overflow")) {
|
|
1437
|
-
group.appendChild(el("div", "echarts-label-sub", "
|
|
1946
|
+
group.appendChild(el("div", "echarts-label-sub", t2("echarts.panel.label.content")));
|
|
1438
1947
|
if (has("formatter")) {
|
|
1439
|
-
const wrap = field("
|
|
1948
|
+
const wrap = field(t2("echarts.panel.label.formatterTitle"));
|
|
1440
1949
|
wrap.appendChild(
|
|
1441
1950
|
selectInput(
|
|
1442
|
-
[{ value: "", label: "
|
|
1951
|
+
[{ value: "", label: t2("echarts.panel.label.formatterCustom") }, ...LABEL_PRESETS.map((preset) => ({ value: preset.formatter, label: t2(preset.labelKey) }))],
|
|
1443
1952
|
state.formatter ?? "",
|
|
1444
1953
|
(value) => commit({ formatter: value })
|
|
1445
1954
|
)
|
|
1446
1955
|
);
|
|
1447
1956
|
wrap.appendChild(
|
|
1448
|
-
textInput({ value: state.formatter ?? "", placeholder: "
|
|
1957
|
+
textInput({ value: state.formatter ?? "", placeholder: t2("echarts.panel.label.formatterPlaceholder") }, (value) => commit({ formatter: value }))
|
|
1449
1958
|
);
|
|
1450
1959
|
group.appendChild(wrap);
|
|
1451
1960
|
}
|
|
1452
1961
|
if (has("overflow")) {
|
|
1453
|
-
const wrap = field("
|
|
1454
|
-
wrap.appendChild(selectInput(
|
|
1962
|
+
const wrap = field(t2("echarts.panel.label.overflow"));
|
|
1963
|
+
wrap.appendChild(selectInput(overflowOptions(), state.overflow ?? "", (value) => commit({ overflow: value })));
|
|
1455
1964
|
group.appendChild(wrap);
|
|
1456
1965
|
}
|
|
1457
1966
|
}
|
|
1458
1967
|
if (has("position") || has("distance") || has("rotate") || has("offset")) {
|
|
1459
|
-
group.appendChild(el("div", "echarts-label-sub", "
|
|
1968
|
+
group.appendChild(el("div", "echarts-label-sub", t2("echarts.panel.label.position")));
|
|
1460
1969
|
if (has("position")) {
|
|
1461
|
-
const wrap = field("
|
|
1970
|
+
const wrap = field(t2("echarts.panel.label.positionTitle"));
|
|
1462
1971
|
const positions = def ? LABEL_POSITIONS[def.seriesType] ?? [] : [];
|
|
1463
1972
|
wrap.appendChild(
|
|
1464
|
-
selectInput([{ value: "", label: "
|
|
1973
|
+
selectInput([{ value: "", label: t2("echarts.panel.label.positionDefault") }, ...positions.map((p) => ({ value: p.value, label: t2(p.labelKey) }))], state.position ?? "", (value) => commit({ position: value }))
|
|
1465
1974
|
);
|
|
1466
1975
|
group.appendChild(wrap);
|
|
1467
1976
|
}
|
|
@@ -1478,7 +1987,7 @@ function renderLabelGroup(ctx, type) {
|
|
|
1478
1987
|
commit({ offset: [parse(inputX, current[0] ?? 0), parse(inputY, current[1] ?? 0)] });
|
|
1479
1988
|
};
|
|
1480
1989
|
var commitOffset = commitOffset2;
|
|
1481
|
-
const wrap = field("
|
|
1990
|
+
const wrap = field(t2("echarts.panel.label.offset"));
|
|
1482
1991
|
const row = el("div", "echarts-field-row");
|
|
1483
1992
|
const current = state.offset ?? [0, 0];
|
|
1484
1993
|
const inputX = textInput({ value: String(current[0] ?? 0), type: "number" }, () => commitOffset2());
|
|
@@ -1491,11 +2000,11 @@ function renderLabelGroup(ctx, type) {
|
|
|
1491
2000
|
}
|
|
1492
2001
|
const styleKeys = ["fontSize", "fontWeight", "color", "backgroundColor", "borderColor", "borderWidth", "borderRadius", "padding"];
|
|
1493
2002
|
if (styleKeys.some(has)) {
|
|
1494
|
-
group.appendChild(el("div", "echarts-label-sub", "
|
|
2003
|
+
group.appendChild(el("div", "echarts-label-sub", t2("echarts.panel.label.style")));
|
|
1495
2004
|
if (has("fontSize")) group.appendChild(numberField("fontSize", state.fontSize));
|
|
1496
2005
|
if (has("fontWeight")) {
|
|
1497
|
-
const wrap = field("
|
|
1498
|
-
wrap.appendChild(selectInput(
|
|
2006
|
+
const wrap = field(t2("echarts.panel.labelLine.fontWeight"));
|
|
2007
|
+
wrap.appendChild(selectInput(fontWeightOptions(), state.fontWeight ?? "", (value) => commit({ fontWeight: value })));
|
|
1499
2008
|
group.appendChild(wrap);
|
|
1500
2009
|
}
|
|
1501
2010
|
for (const key of ["color", "backgroundColor", "borderColor"]) {
|
|
@@ -1506,12 +2015,12 @@ function renderLabelGroup(ctx, type) {
|
|
|
1506
2015
|
}
|
|
1507
2016
|
}
|
|
1508
2017
|
if (has("labelLine.show")) {
|
|
1509
|
-
group.appendChild(el("div", "echarts-label-sub", "
|
|
2018
|
+
group.appendChild(el("div", "echarts-label-sub", t2("echarts.panel.labelLine")));
|
|
1510
2019
|
group.appendChild(
|
|
1511
|
-
checkboxField("
|
|
2020
|
+
checkboxField(t2("echarts.panel.labelLine.show"), state.labelLine.show === true, (checked) => commit({ labelLine: { show: checked } }))
|
|
1512
2021
|
);
|
|
1513
2022
|
if (has("labelLine.length")) {
|
|
1514
|
-
const wrap = field("
|
|
2023
|
+
const wrap = field(t2("echarts.panel.labelLine.length"));
|
|
1515
2024
|
wrap.appendChild(
|
|
1516
2025
|
textInput(
|
|
1517
2026
|
{ value: state.labelLine.length === void 0 ? "" : String(state.labelLine.length), type: "number" },
|
|
@@ -1521,7 +2030,7 @@ function renderLabelGroup(ctx, type) {
|
|
|
1521
2030
|
group.appendChild(wrap);
|
|
1522
2031
|
}
|
|
1523
2032
|
if (has("labelLine.length2")) {
|
|
1524
|
-
const wrap = field("
|
|
2033
|
+
const wrap = field(t2("echarts.panel.labelLine.length2"));
|
|
1525
2034
|
wrap.appendChild(
|
|
1526
2035
|
textInput(
|
|
1527
2036
|
{ value: state.labelLine.length2 === void 0 ? "" : String(state.labelLine.length2), type: "number" },
|
|
@@ -1532,13 +2041,16 @@ function renderLabelGroup(ctx, type) {
|
|
|
1532
2041
|
}
|
|
1533
2042
|
if (has("labelLine.smooth")) {
|
|
1534
2043
|
group.appendChild(
|
|
1535
|
-
checkboxField("
|
|
2044
|
+
checkboxField(t2("echarts.panel.labelLine.smooth"), state.labelLine.smooth === true, (checked) => commit({ labelLine: { smooth: checked } }))
|
|
1536
2045
|
);
|
|
1537
2046
|
}
|
|
1538
2047
|
}
|
|
1539
2048
|
return group;
|
|
1540
2049
|
}
|
|
1541
2050
|
function renderProperty(ctx) {
|
|
2051
|
+
return withTranslator(ctx.t, () => renderPropertyInner(ctx));
|
|
2052
|
+
}
|
|
2053
|
+
function renderPropertyInner(ctx) {
|
|
1542
2054
|
const element = ctx.element;
|
|
1543
2055
|
const type = elementType(element);
|
|
1544
2056
|
const def = getChartKindDefinition(type);
|
|
@@ -1555,7 +2067,7 @@ function renderProperty(ctx) {
|
|
|
1555
2067
|
form.addEventListener("submit", (event) => event.preventDefault());
|
|
1556
2068
|
root.appendChild(form);
|
|
1557
2069
|
if (has("dataSource")) {
|
|
1558
|
-
const wrap = field("
|
|
2070
|
+
const wrap = field(t2("echarts.panel.dataSourceTitle"));
|
|
1559
2071
|
const current = String(options.chartDataSource ?? "");
|
|
1560
2072
|
wrap.appendChild(
|
|
1561
2073
|
dropdownSelect(
|
|
@@ -1567,7 +2079,7 @@ function renderProperty(ctx) {
|
|
|
1567
2079
|
form.appendChild(wrap);
|
|
1568
2080
|
}
|
|
1569
2081
|
if (has("categoryField")) {
|
|
1570
|
-
const wrap = field("
|
|
2082
|
+
const wrap = field(t2("echarts.panel.categoryField"));
|
|
1571
2083
|
const current = String(options.chartCategoryField ?? "");
|
|
1572
2084
|
wrap.appendChild(
|
|
1573
2085
|
dropdownSelect(
|
|
@@ -1597,14 +2109,14 @@ function renderProperty(ctx) {
|
|
|
1597
2109
|
if (fieldsNow.length > 1) {
|
|
1598
2110
|
const remove = el("button", "pd-button small", "\u2212");
|
|
1599
2111
|
remove.type = "button";
|
|
1600
|
-
remove.title = "
|
|
2112
|
+
remove.title = t2("echarts.panel.removeField");
|
|
1601
2113
|
remove.addEventListener("click", () => syncValueFields(ctx, type, readValueFields(element).filter((_, i) => i !== index)));
|
|
1602
2114
|
row.appendChild(remove);
|
|
1603
2115
|
}
|
|
1604
2116
|
wrap.appendChild(row);
|
|
1605
2117
|
});
|
|
1606
2118
|
if (fieldsNow.length < limit) {
|
|
1607
|
-
const add = el("button", "pd-button small", "
|
|
2119
|
+
const add = el("button", "pd-button small", t2("echarts.panel.addField"));
|
|
1608
2120
|
add.type = "button";
|
|
1609
2121
|
add.addEventListener("click", () => syncValueFields(ctx, type, [...readValueFields(element), ""]));
|
|
1610
2122
|
wrap.appendChild(add);
|
|
@@ -1612,10 +2124,10 @@ function renderProperty(ctx) {
|
|
|
1612
2124
|
form.appendChild(wrap);
|
|
1613
2125
|
}
|
|
1614
2126
|
if (has("seriesField")) {
|
|
1615
|
-
const wrap = field("
|
|
2127
|
+
const wrap = field(t2("echarts.panel.seriesField"));
|
|
1616
2128
|
wrap.appendChild(
|
|
1617
2129
|
textInput(
|
|
1618
|
-
{ value: String(options.chartSeriesField ?? ""), placeholder: "
|
|
2130
|
+
{ value: String(options.chartSeriesField ?? ""), placeholder: t2("echarts.panel.seriesFieldHint") },
|
|
1619
2131
|
(value) => commitOption(ctx, type, panelOption(element), { chartSeriesField: value })
|
|
1620
2132
|
)
|
|
1621
2133
|
);
|
|
@@ -1623,16 +2135,16 @@ function renderProperty(ctx) {
|
|
|
1623
2135
|
}
|
|
1624
2136
|
if (has("bubble")) {
|
|
1625
2137
|
form.appendChild(
|
|
1626
|
-
checkboxField("
|
|
2138
|
+
checkboxField(t2("echarts.panel.bubbleSize"), options.chartBubble === true, (checked) => {
|
|
1627
2139
|
commitOption(ctx, type, panelOption(element), { chartBubble: checked });
|
|
1628
2140
|
})
|
|
1629
2141
|
);
|
|
1630
2142
|
}
|
|
1631
2143
|
if (has("title")) {
|
|
1632
|
-
const wrap = field("
|
|
2144
|
+
const wrap = field(t2("echarts.panel.title"));
|
|
1633
2145
|
wrap.appendChild(
|
|
1634
2146
|
textInput(
|
|
1635
|
-
{ value: String(asObject(panelOption(element).title).text ?? ""), placeholder: "
|
|
2147
|
+
{ value: String(asObject(panelOption(element).title).text ?? ""), placeholder: t2("echarts.panel.titleHint") },
|
|
1636
2148
|
(value) => {
|
|
1637
2149
|
const next = panelOption(element);
|
|
1638
2150
|
next.title = { ...asObject(next.title), text: value };
|
|
@@ -1645,7 +2157,7 @@ function renderProperty(ctx) {
|
|
|
1645
2157
|
if (has("legend")) {
|
|
1646
2158
|
const show = asObject(panelOption(element).legend).show !== false;
|
|
1647
2159
|
form.appendChild(
|
|
1648
|
-
checkboxField("
|
|
2160
|
+
checkboxField(t2("echarts.panel.legend"), show, (checked) => {
|
|
1649
2161
|
const next = panelOption(element);
|
|
1650
2162
|
next.legend = { ...asObject(next.legend), show: checked };
|
|
1651
2163
|
commitOption(ctx, type, next);
|
|
@@ -1653,12 +2165,12 @@ function renderProperty(ctx) {
|
|
|
1653
2165
|
);
|
|
1654
2166
|
}
|
|
1655
2167
|
if (has("palette")) {
|
|
1656
|
-
const wrap = field("
|
|
2168
|
+
const wrap = field(t2("echarts.panel.palette"));
|
|
1657
2169
|
const select = el("select", "pd-select");
|
|
1658
2170
|
for (const palette of palettes) {
|
|
1659
2171
|
const optionEl = el("option");
|
|
1660
2172
|
optionEl.value = palette.key;
|
|
1661
|
-
optionEl.textContent = palette.label;
|
|
2173
|
+
optionEl.textContent = palette.labelKey ? t2(palette.labelKey) : palette.label;
|
|
1662
2174
|
select.appendChild(optionEl);
|
|
1663
2175
|
}
|
|
1664
2176
|
select.value = readPaletteKey(panelOption(element), palettes);
|
|
@@ -1678,7 +2190,7 @@ function renderProperty(ctx) {
|
|
|
1678
2190
|
const series = seriesList(panelOption(element));
|
|
1679
2191
|
const stacked = series.some((item) => item.stack !== void 0 && item.stack !== null && item.stack !== "");
|
|
1680
2192
|
form.appendChild(
|
|
1681
|
-
checkboxField("
|
|
2193
|
+
checkboxField(t2("echarts.panel.stack"), stacked, (checked) => {
|
|
1682
2194
|
const next = panelOption(element);
|
|
1683
2195
|
for (const item of seriesList(next)) {
|
|
1684
2196
|
if (checked) item.stack = "total";
|
|
@@ -1689,7 +2201,7 @@ function renderProperty(ctx) {
|
|
|
1689
2201
|
);
|
|
1690
2202
|
}
|
|
1691
2203
|
if (has("innerRadius")) {
|
|
1692
|
-
const wrap = field("
|
|
2204
|
+
const wrap = field(t2("echarts.panel.innerRadius"));
|
|
1693
2205
|
const radius = seriesList(panelOption(element))[0]?.radius;
|
|
1694
2206
|
const inner = Array.isArray(radius) ? Number(String(radius[0] ?? "40%").replace("%", "")) || 40 : 40;
|
|
1695
2207
|
wrap.appendChild(
|
|
@@ -1703,14 +2215,14 @@ function renderProperty(ctx) {
|
|
|
1703
2215
|
form.appendChild(wrap);
|
|
1704
2216
|
}
|
|
1705
2217
|
if (has("padding")) {
|
|
1706
|
-
const wrap = field(
|
|
2218
|
+
const wrap = field(t2("echarts.panel.paddingTRBL"));
|
|
1707
2219
|
const padding = readFunnelPadding(panelOption(element), widthMm, heightMm);
|
|
1708
2220
|
const row = el("div", "echarts-field-row");
|
|
1709
2221
|
const sides = [
|
|
1710
|
-
{ side: "top", title: "
|
|
1711
|
-
{ side: "right", title: "
|
|
1712
|
-
{ side: "bottom", title: "
|
|
1713
|
-
{ side: "left", title: "
|
|
2222
|
+
{ side: "top", title: t2("echarts.panel.paddingTop") },
|
|
2223
|
+
{ side: "right", title: t2("echarts.panel.paddingRight") },
|
|
2224
|
+
{ side: "bottom", title: t2("echarts.panel.paddingBottom") },
|
|
2225
|
+
{ side: "left", title: t2("echarts.panel.paddingLeft") }
|
|
1714
2226
|
];
|
|
1715
2227
|
for (const { side, title } of sides) {
|
|
1716
2228
|
row.appendChild(
|
|
@@ -1727,7 +2239,7 @@ function renderProperty(ctx) {
|
|
|
1727
2239
|
form.appendChild(wrap);
|
|
1728
2240
|
}
|
|
1729
2241
|
if (has("radius")) {
|
|
1730
|
-
const wrap = field("
|
|
2242
|
+
const wrap = field(t2("echarts.panel.radius"));
|
|
1731
2243
|
wrap.appendChild(
|
|
1732
2244
|
textInput(
|
|
1733
2245
|
{ value: String(readRadarRadius(panelOption(element), widthMm, heightMm)), type: "number", min: 20, max: 100 },
|
|
@@ -1741,7 +2253,7 @@ function renderProperty(ctx) {
|
|
|
1741
2253
|
form.appendChild(wrap);
|
|
1742
2254
|
}
|
|
1743
2255
|
if (has("gaugeRange")) {
|
|
1744
|
-
const wrap = field("
|
|
2256
|
+
const wrap = field(t2("echarts.panel.minMax"));
|
|
1745
2257
|
const series = seriesList(panelOption(element));
|
|
1746
2258
|
const row = el("div", "echarts-field-row");
|
|
1747
2259
|
row.appendChild(
|
|
@@ -1763,7 +2275,7 @@ function renderProperty(ctx) {
|
|
|
1763
2275
|
wrap.appendChild(row);
|
|
1764
2276
|
form.appendChild(wrap);
|
|
1765
2277
|
}
|
|
1766
|
-
form.appendChild(el("p", "pd-hint",
|
|
2278
|
+
form.appendChild(el("p", "pd-hint", panelHint()));
|
|
1767
2279
|
return root;
|
|
1768
2280
|
}
|
|
1769
2281
|
var CHART_ELEMENT_UI = defineElementUI({
|
|
@@ -1771,9 +2283,11 @@ var CHART_ELEMENT_UI = defineElementUI({
|
|
|
1771
2283
|
renderCanvas,
|
|
1772
2284
|
renderProperty,
|
|
1773
2285
|
hasProperties: chartHasProperties,
|
|
1774
|
-
group: "
|
|
2286
|
+
group: t2("echarts.panel.group"),
|
|
1775
2287
|
searchKeywords: SEARCH_KEYWORDS,
|
|
1776
|
-
styles: STYLES
|
|
2288
|
+
styles: STYLES,
|
|
2289
|
+
i18nId: "echarts",
|
|
2290
|
+
locales: { "zh-CN": zh_CN_default.echarts, "en-US": en_US_default.echarts, "th-TH": th_TH_default.echarts }
|
|
1777
2291
|
});
|
|
1778
2292
|
var disposeHandle2;
|
|
1779
2293
|
function installChartCommonUI() {
|