@worm-print-platform/echarts 1.5.3 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- 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 +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/defaults.d.ts +1 -1
- package/dist/echarts.d.ts +1 -1
- package/dist/echarts.js +14 -14
- package/dist/executor.iife.global.d.ts +1 -1
- package/dist/executor.iife.global.js +14 -14
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -12
- package/dist/kinds.d.ts +2 -2
- package/dist/kit.cjs +2 -2
- package/dist/kit.d.ts +3 -1
- package/dist/kit.js +45 -148
- package/dist/label.d.ts +63 -0
- package/dist/marketplace.d.ts +1 -1
- package/dist/marketplace.js +801 -80
- package/dist/node.cjs +48 -21
- package/dist/node.d.ts +1 -1
- package/dist/node.js +48 -21
- package/dist/normalize.d.ts +1 -1
- package/dist/option-utils.d.ts +1 -1
- package/dist/plugin-BWmSrZ3m.cjs +6 -0
- package/dist/plugin-Dvcrcg_Z.js +933 -0
- package/dist/plugin.d.ts +1 -1
- package/dist/renderer.d.ts +1 -1
- package/dist/type-augmentation.d.ts +1 -1
- package/dist/ui.cjs +1432 -60
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +1410 -57
- package/dist/units.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
- package/dist/plugin-Bf6QDbHO.cjs +0 -6
- package/dist/plugin-CUoE2jMs.js +0 -573
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.
|
|
2
|
+
* @worm-print-platform/echarts v1.6.0
|
|
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
|
-
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./plugin-
|
|
6
|
+
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./plugin-BWmSrZ3m.cjs");t.registerChartPlugin();exports.CHART_KINDS=t.CHART_KINDS;exports.CHART_KIND_DEFINITIONS=t.CHART_KIND_DEFINITIONS;exports.CHART_PALETTES=t.CHART_PALETTES;exports.CHART_PLUGIN=t.CHART_PLUGIN;exports.CHART_PLUGIN_ID=t.CHART_PLUGIN_ID;exports.bindChartData=t.bindChartData;exports.chartFactoryDefaults=t.chartFactoryDefaults;exports.configureChartPlugin=t.configureChartPlugin;exports.createDefaultChartOption=t.createDefaultChartOption;exports.fitSvgRoot=t.fitSvgRoot;exports.getChartKindDefinition=t.getChartKindDefinition;exports.getChartPalettes=t.getChartPalettes;exports.getChartPluginConfig=t.getChartPluginConfig;exports.getSampleCategories=t.getSampleCategories;exports.mmToChartPx=t.mmToChartPx;exports.normalizeChartOption=t.normalizeChartOption;exports.registerChartDesigner=t.registerChartDesigner;exports.registerChartExecutorBundle=t.registerChartExecutorBundle;exports.registerChartPlugin=t.registerChartPlugin;exports.renderChartElement=t.renderChartElement;exports.renderChartToSvg=t.renderChartToSvg;exports.resolveChartPanelFields=t.resolveChartPanelFields;exports.uninstallChartPlugin=t.uninstallChartPlugin;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.
|
|
2
|
+
* @worm-print-platform/echarts v1.6.0
|
|
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
|
-
*/import {
|
|
7
|
-
import { C as s, a as i, b as C, c as n, d as o,
|
|
6
|
+
*/import { G as a } from "./plugin-Dvcrcg_Z.js";
|
|
7
|
+
import { C as s, a as i, b as C, c as n, d as o, i as g, j as l, l as h, m as u, n as D, o as P, p as T, q as m, r as I, u as f, v as d, B as p, D as _, H as c, I as A, J as H, M as N } from "./plugin-Dvcrcg_Z.js";
|
|
8
8
|
a();
|
|
9
9
|
export {
|
|
10
10
|
s as CHART_KINDS,
|
|
@@ -13,21 +13,21 @@ export {
|
|
|
13
13
|
n as CHART_PLUGIN,
|
|
14
14
|
o as CHART_PLUGIN_ID,
|
|
15
15
|
g as bindChartData,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
l as chartFactoryDefaults,
|
|
17
|
+
h as configureChartPlugin,
|
|
18
18
|
u as createDefaultChartOption,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
D as fitSvgRoot,
|
|
20
|
+
P as getChartKindDefinition,
|
|
21
|
+
T as getChartPalettes,
|
|
22
22
|
m as getChartPluginConfig,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
I as getSampleCategories,
|
|
24
|
+
f as mmToChartPx,
|
|
25
25
|
d as normalizeChartOption,
|
|
26
26
|
p as registerChartDesigner,
|
|
27
27
|
_ as registerChartExecutorBundle,
|
|
28
28
|
a as registerChartPlugin,
|
|
29
29
|
c as renderChartElement,
|
|
30
30
|
A as renderChartToSvg,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
H as resolveChartPanelFields,
|
|
32
|
+
N as uninstallChartPlugin
|
|
33
33
|
};
|
package/dist/kinds.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.
|
|
2
|
+
* @worm-print-platform/echarts v1.6.0
|
|
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
|
-
export type ChartFieldKey = 'dataSource' | 'categoryField' | 'valueFields' | 'seriesField' | 'title' | 'legend' | 'palette' | 'stack' | 'bubble' | 'innerRadius' | 'gaugeRange' | 'padding' | 'radius';
|
|
7
|
+
export type ChartFieldKey = 'dataSource' | 'categoryField' | 'valueFields' | 'seriesField' | 'title' | 'legend' | 'palette' | 'stack' | 'bubble' | 'innerRadius' | 'gaugeRange' | 'padding' | 'radius' | 'label';
|
|
8
8
|
export type ChartSeriesType = 'bar' | 'line' | 'pie' | 'scatter' | 'radar' | 'funnel' | 'gauge';
|
|
9
9
|
export interface ChartKindDefinition {
|
|
10
10
|
type: string;
|
package/dist/kit.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.
|
|
2
|
+
* @worm-print-platform/echarts v1.6.0
|
|
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
|
-
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
6
|
+
*/"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./plugin-BWmSrZ3m.cjs");exports.CHART_KINDS=e.CHART_KINDS;exports.CHART_KIND_DEFINITIONS=e.CHART_KIND_DEFINITIONS;exports.CHART_PALETTES=e.CHART_PALETTES;exports.CHART_PLUGIN=e.CHART_PLUGIN;exports.CHART_PLUGIN_ID=e.CHART_PLUGIN_ID;exports.ECHARTS_FUNNEL_PADDING_PX=e.ECHARTS_FUNNEL_PADDING_PX;exports.ECHARTS_RADAR_RADIUS_DEFAULT=e.ECHARTS_RADAR_RADIUS_DEFAULT;exports.FALLBACK_SAMPLE_CATEGORIES=e.FALLBACK_SAMPLE_CATEGORIES;exports.FUNNEL_PADDING_DEFAULTS=e.FUNNEL_PADDING_DEFAULTS;exports.LABEL_POSITIONS=e.LABEL_POSITIONS;exports.LABEL_PRESETS=e.LABEL_PRESETS;exports.RADAR_RADIUS_DEFAULT=e.RADAR_RADIUS_DEFAULT;exports.asObject=e.asObject;exports.bindChartData=e.bindChartData;exports.chartFactoryDefaults=e.chartFactoryDefaults;exports.cloneChartOption=e.cloneChartOption;exports.configureChartPlugin=e.configureChartPlugin;exports.createDefaultChartOption=e.createDefaultChartOption;exports.fitSvgRoot=e.fitSvgRoot;exports.getChartKindDefinition=e.getChartKindDefinition;exports.getChartPalettes=e.getChartPalettes;exports.getChartPluginConfig=e.getChartPluginConfig;exports.getSampleCategories=e.getSampleCategories;exports.labelFieldsOf=e.labelFieldsOf;exports.labelTargetOf=e.labelTargetOf;exports.mmToChartPx=e.mmToChartPx;exports.normalizeChartOption=e.normalizeChartOption;exports.previewChartOption=e.previewChartOption;exports.readChartLabel=e.readChartLabel;exports.readFunnelPadding=e.readFunnelPadding;exports.readPaletteKey=e.readPaletteKey;exports.readRadarRadius=e.readRadarRadius;exports.registerChartDesigner=e.registerChartDesigner;exports.registerChartExecutorBundle=e.registerChartExecutorBundle;exports.registerChartPlugin=e.registerChartPlugin;exports.renderChartElement=e.renderChartElement;exports.renderChartToSvg=e.renderChartToSvg;exports.resolveChartPanelFields=e.resolveChartPanelFields;exports.syncSeriesCount=e.syncSeriesCount;exports.uninstallChartPlugin=e.uninstallChartPlugin;exports.updateChartLabel=e.updateChartLabel;exports.writeFunnelPadding=e.writeFunnelPadding;exports.writeRadarRadius=e.writeRadarRadius;
|
package/dist/kit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.
|
|
2
|
+
* @worm-print-platform/echarts v1.6.0
|
|
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
|
|
@@ -14,6 +14,8 @@ export type { ChartPalette, ChartPaletteDefinition, ChartPluginConfig } from './
|
|
|
14
14
|
export { CHART_KINDS, CHART_KIND_DEFINITIONS, getChartKindDefinition, resolveChartPanelFields } from './kinds.js';
|
|
15
15
|
export type { ChartFieldKey, ChartKindDefinition, ChartSeriesType } from './kinds.js';
|
|
16
16
|
export { createDefaultChartOption } from './defaults.js';
|
|
17
|
+
export { LABEL_POSITIONS, LABEL_PRESETS, labelFieldsOf, labelTargetOf, readChartLabel, updateChartLabel, } from './label.js';
|
|
18
|
+
export type { ChartLabelPatch, ChartLabelState, LabelFieldKey } from './label.js';
|
|
17
19
|
export { normalizeChartOption } from './normalize.js';
|
|
18
20
|
export { bindChartData } from './bind.js';
|
|
19
21
|
export { fitSvgRoot, mmToChartPx, renderChartElement, renderChartToSvg } from './renderer.js';
|
package/dist/kit.js
CHANGED
|
@@ -1,154 +1,51 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/echarts v1.
|
|
2
|
+
* @worm-print-platform/echarts v1.6.0
|
|
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
|
-
*/import {
|
|
7
|
-
import { C as O, a as j, b as H, c as M, d as v, F as $, x as G, R as K, e as z, f as B, g as J, h as W, i as q, k as V, l as X, o as Q, p as Y, q as Z, r as rr, s as tr, t as er, u as ar, v as sr } from "./plugin-CUoE2jMs.js";
|
|
8
|
-
const x = [12, 20, 15];
|
|
9
|
-
function m(r) {
|
|
10
|
-
try {
|
|
11
|
-
return JSON.parse(JSON.stringify(r));
|
|
12
|
-
} catch {
|
|
13
|
-
return r;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
function R(r, e) {
|
|
17
|
-
if (!e || typeof e != "object" || Array.isArray(e)) return {};
|
|
18
|
-
const t = m(e), i = C(r), a = [...D()], s = [...x], o = Array.isArray(t.series) ? t.series : [], u = (n) => {
|
|
19
|
-
for (const c of o)
|
|
20
|
-
Array.isArray(c.data) && c.data.includes("$data") && (c.data = n(c));
|
|
21
|
-
}, f = () => {
|
|
22
|
-
for (const n of ["xAxis", "yAxis"]) {
|
|
23
|
-
const c = Array.isArray(t[n]) ? t[n] : t[n] ? [t[n]] : [];
|
|
24
|
-
for (const h of c)
|
|
25
|
-
h && Array.isArray(h.data) && h.data.includes("$data") && (h.data = [...a]);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
switch (i?.seriesType) {
|
|
29
|
-
case "pie":
|
|
30
|
-
u(() => a.map((n, c) => ({ name: n, value: s[c] ?? 10 })));
|
|
31
|
-
break;
|
|
32
|
-
case "funnel":
|
|
33
|
-
u(() => a.map((n, c) => ({ name: n, value: s[c] ?? 10 })));
|
|
34
|
-
break;
|
|
35
|
-
case "scatter":
|
|
36
|
-
u(() => s.map((n) => [n, n + 6]));
|
|
37
|
-
break;
|
|
38
|
-
case "radar":
|
|
39
|
-
t.radar = {
|
|
40
|
-
...t.radar ?? {},
|
|
41
|
-
indicator: a.map((n) => ({ name: n, max: 30 }))
|
|
42
|
-
}, u(() => [{ name: "示例", value: s }]);
|
|
43
|
-
break;
|
|
44
|
-
case "gauge":
|
|
45
|
-
u(() => [{ value: s[0] ?? 40, name: "数量" }]);
|
|
46
|
-
break;
|
|
47
|
-
default:
|
|
48
|
-
u(() => [...s]), f();
|
|
49
|
-
break;
|
|
50
|
-
}
|
|
51
|
-
return t;
|
|
52
|
-
}
|
|
53
|
-
function T(r, e) {
|
|
54
|
-
const t = Array.isArray(r?.color) ? (r?.color).map(String) : [];
|
|
55
|
-
return e.find((a) => a.colors.every((s, o) => s === t[o]) && t.length === a.colors.length)?.key ?? "default";
|
|
56
|
-
}
|
|
57
|
-
function b(r) {
|
|
58
|
-
return Array.isArray(r) ? r[0] && typeof r[0] == "object" ? { ...r[0] } : {} : r && typeof r == "object" ? { ...r } : {};
|
|
59
|
-
}
|
|
60
|
-
function E(r, e, t) {
|
|
61
|
-
const i = m(r), a = Array.isArray(i.series) ? i.series : [], s = C(t), o = a[0] ?? { type: s?.seriesType === "line" ? "line" : "bar", data: ["$data"] };
|
|
62
|
-
return i.series = Array.from({ length: Math.max(e, 1) }, (u, f) => ({
|
|
63
|
-
...o,
|
|
64
|
-
...a[f] ?? {},
|
|
65
|
-
data: ["$data"]
|
|
66
|
-
})), i;
|
|
67
|
-
}
|
|
68
|
-
const g = (r) => Math.round(r * 10) / 10;
|
|
69
|
-
function p(r, e) {
|
|
70
|
-
return e > 0 ? g(r / e * 100) : 0;
|
|
71
|
-
}
|
|
72
|
-
function y(r, e, t) {
|
|
73
|
-
if (typeof r == "string" && r.trim().endsWith("%")) {
|
|
74
|
-
const i = Number.parseFloat(r);
|
|
75
|
-
if (Number.isFinite(i)) return g(i);
|
|
76
|
-
}
|
|
77
|
-
return typeof r == "number" && Number.isFinite(r) ? p(r, e) : p(t, e);
|
|
78
|
-
}
|
|
79
|
-
function S(r, e, t) {
|
|
80
|
-
return Math.min(t, Math.max(e, r));
|
|
81
|
-
}
|
|
82
|
-
function A(r) {
|
|
83
|
-
return `${S(g(r), 0, 100)}%`;
|
|
84
|
-
}
|
|
85
|
-
function _(r) {
|
|
86
|
-
const t = (Array.isArray(r.series) ? r.series : [])[0];
|
|
87
|
-
return t && typeof t == "object" ? t : {};
|
|
88
|
-
}
|
|
89
|
-
function F(r, e, t) {
|
|
90
|
-
const a = _(r && typeof r == "object" ? r : {}), s = d(e), o = d(t);
|
|
91
|
-
return {
|
|
92
|
-
top: y(a.top, o, l.top),
|
|
93
|
-
right: y(a.right, s, l.right),
|
|
94
|
-
bottom: y(a.bottom, o, l.bottom),
|
|
95
|
-
left: y(a.left, s, l.left)
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function I(r, e) {
|
|
99
|
-
const t = m(r), i = Array.isArray(t.series) ? t.series : [];
|
|
100
|
-
i.length === 0 && i.push({ type: "funnel", data: ["$data"] });
|
|
101
|
-
const a = i[0];
|
|
102
|
-
return a.top = A(e.top), a.right = A(e.right), a.bottom = A(e.bottom), a.left = A(e.left), t.series = i, t;
|
|
103
|
-
}
|
|
104
|
-
function L(r, e, t) {
|
|
105
|
-
const a = b((r && typeof r == "object" ? r : {}).radar).radius, s = Array.isArray(a) ? a[a.length - 1] : a, o = d(e), u = d(t), f = Math.min(o, u) / 2;
|
|
106
|
-
if (typeof s == "string" && s.trim().endsWith("%")) {
|
|
107
|
-
const n = Number.parseFloat(s);
|
|
108
|
-
if (Number.isFinite(n)) return g(n);
|
|
109
|
-
}
|
|
110
|
-
return typeof s == "number" && Number.isFinite(s) ? p(s, f) : P;
|
|
111
|
-
}
|
|
112
|
-
function w(r, e) {
|
|
113
|
-
const t = m(r);
|
|
114
|
-
return t.radar = { ...b(t.radar), radius: A(S(e, 20, 100)) }, t;
|
|
115
|
-
}
|
|
6
|
+
*/import { C as s, a as t, b as r, c as i, d as n, E as C, e as l, F as A, f as d, L as g, g as h, R as o, h as D, i as R, j as _, k as E, l as P, m as T, n as L, o as S, p as u, q as I, r as N, s as F, t as O, u as f, v as c, w as p, x as U, y as H, z as b, A as m, B as G, D as K, G as v, H as B, I as w, J as x, K as y, M as j, N as z, O as M, P as k } from "./plugin-Dvcrcg_Z.js";
|
|
116
7
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
w as
|
|
8
|
+
s as CHART_KINDS,
|
|
9
|
+
t as CHART_KIND_DEFINITIONS,
|
|
10
|
+
r as CHART_PALETTES,
|
|
11
|
+
i as CHART_PLUGIN,
|
|
12
|
+
n as CHART_PLUGIN_ID,
|
|
13
|
+
C as ECHARTS_FUNNEL_PADDING_PX,
|
|
14
|
+
l as ECHARTS_RADAR_RADIUS_DEFAULT,
|
|
15
|
+
A as FALLBACK_SAMPLE_CATEGORIES,
|
|
16
|
+
d as FUNNEL_PADDING_DEFAULTS,
|
|
17
|
+
g as LABEL_POSITIONS,
|
|
18
|
+
h as LABEL_PRESETS,
|
|
19
|
+
o as RADAR_RADIUS_DEFAULT,
|
|
20
|
+
D as asObject,
|
|
21
|
+
R as bindChartData,
|
|
22
|
+
_ as chartFactoryDefaults,
|
|
23
|
+
E as cloneChartOption,
|
|
24
|
+
P as configureChartPlugin,
|
|
25
|
+
T as createDefaultChartOption,
|
|
26
|
+
L as fitSvgRoot,
|
|
27
|
+
S as getChartKindDefinition,
|
|
28
|
+
u as getChartPalettes,
|
|
29
|
+
I as getChartPluginConfig,
|
|
30
|
+
N as getSampleCategories,
|
|
31
|
+
F as labelFieldsOf,
|
|
32
|
+
O as labelTargetOf,
|
|
33
|
+
f as mmToChartPx,
|
|
34
|
+
c as normalizeChartOption,
|
|
35
|
+
p as previewChartOption,
|
|
36
|
+
U as readChartLabel,
|
|
37
|
+
H as readFunnelPadding,
|
|
38
|
+
b as readPaletteKey,
|
|
39
|
+
m as readRadarRadius,
|
|
40
|
+
G as registerChartDesigner,
|
|
41
|
+
K as registerChartExecutorBundle,
|
|
42
|
+
v as registerChartPlugin,
|
|
43
|
+
B as renderChartElement,
|
|
44
|
+
w as renderChartToSvg,
|
|
45
|
+
x as resolveChartPanelFields,
|
|
46
|
+
y as syncSeriesCount,
|
|
47
|
+
j as uninstallChartPlugin,
|
|
48
|
+
z as updateChartLabel,
|
|
49
|
+
M as writeFunnelPadding,
|
|
50
|
+
k as writeRadarRadius
|
|
154
51
|
};
|
package/dist/label.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/echarts v1.6.0
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
import type { ChartSeriesType } from './kinds.js';
|
|
8
|
+
export type LabelFieldKey = 'formatter' | 'overflow' | 'position' | 'distance' | 'rotate' | 'offset' | 'fontSize' | 'fontWeight' | 'color' | 'backgroundColor' | 'borderColor' | 'borderWidth' | 'borderRadius' | 'padding' | 'labelLine.show' | 'labelLine.length' | 'labelLine.length2' | 'labelLine.smooth';
|
|
9
|
+
export interface ChartLabelState {
|
|
10
|
+
show: boolean;
|
|
11
|
+
formatter?: string;
|
|
12
|
+
overflow?: string;
|
|
13
|
+
position?: string;
|
|
14
|
+
distance?: number;
|
|
15
|
+
rotate?: number;
|
|
16
|
+
/** ECharts 原生标签偏移 [x, y];旧模板的 offsetX / offsetY 在读取时迁移至此 */
|
|
17
|
+
offset?: [number, number];
|
|
18
|
+
fontSize?: number;
|
|
19
|
+
fontWeight?: string;
|
|
20
|
+
color?: string;
|
|
21
|
+
backgroundColor?: string;
|
|
22
|
+
borderColor?: string;
|
|
23
|
+
borderWidth?: number;
|
|
24
|
+
borderRadius?: number;
|
|
25
|
+
padding?: number;
|
|
26
|
+
labelLine: {
|
|
27
|
+
show?: boolean;
|
|
28
|
+
length?: number;
|
|
29
|
+
length2?: number;
|
|
30
|
+
smooth?: boolean;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface ChartLabelPatch extends Partial<Omit<ChartLabelState, 'labelLine'>> {
|
|
34
|
+
/** 总开关:true 写默认集(只补缺失键),false 只写 show:false */
|
|
35
|
+
enabled?: boolean;
|
|
36
|
+
labelLine?: {
|
|
37
|
+
show?: boolean;
|
|
38
|
+
length?: number | null;
|
|
39
|
+
length2?: number | null;
|
|
40
|
+
smooth?: boolean;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** formatter 预设:底层仍是 ECharts 字符串模板,选中即写入 formatter */
|
|
44
|
+
export declare const LABEL_PRESETS: readonly {
|
|
45
|
+
key: string;
|
|
46
|
+
label: string;
|
|
47
|
+
formatter: string;
|
|
48
|
+
}[];
|
|
49
|
+
/** 标签位置候选:按 seriesType 给,ECharts 对不适用项会忽略,面板只做引导 */
|
|
50
|
+
export declare const LABEL_POSITIONS: Readonly<Record<ChartSeriesType, readonly {
|
|
51
|
+
value: string;
|
|
52
|
+
label: string;
|
|
53
|
+
}[]>>;
|
|
54
|
+
/**
|
|
55
|
+
* 把单个 label / detail 上的旧 offsetX / offsetY 迁成 ECharts 原生 offset: [x, y](原地修改)。
|
|
56
|
+
* 旧键来自早期面板误写,ECharts 不识别,必须在读取、写入与出图归一三处统一迁移。
|
|
57
|
+
*/
|
|
58
|
+
export declare function normalizeLabelOffsetInPlace(target: Record<string, any>): void;
|
|
59
|
+
/** 仪表盘的数值文本走 series[].detail,其余走 series[].label */
|
|
60
|
+
export declare function labelTargetOf(type: string): 'label' | 'detail';
|
|
61
|
+
export declare function labelFieldsOf(type: string): readonly LabelFieldKey[];
|
|
62
|
+
export declare function readChartLabel(option: Record<string, unknown> | undefined, type: string): ChartLabelState;
|
|
63
|
+
export declare function updateChartLabel(option: Record<string, unknown> | undefined, type: string, patch: ChartLabelPatch): Record<string, unknown>;
|
package/dist/marketplace.d.ts
CHANGED