@idux/charts-core 0.4.1 → 0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @idux/charts-core
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0.6.0
8
+
9
+ ## 0.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 0.5.0
14
+
3
15
  ## 0.4.1
4
16
 
5
17
  ### Patch Changes
@@ -1,4 +1,4 @@
1
1
  import { type HTMLAttributes } from 'vue-demi';
2
2
  import { type ChartProps } from '../types';
3
- declare const _default: import("vue-demi").DefineComponent<Omit<HTMLAttributes, keyof ChartProps> & ChartProps, {}, {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<Omit<HTMLAttributes, keyof ChartProps> & ChartProps>>, {}>;
3
+ declare const _default: import("vue-demi").DefineComponent<Omit<HTMLAttributes, keyof ChartProps> & ChartProps, {}, {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<Omit<HTMLAttributes, keyof ChartProps> & ChartProps>>, {}, {}>;
4
4
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const IxChart: import("vue").DefineComponent<Omit<import("vue").HTMLAttributes, keyof import("..").ChartProps> & import("..").ChartProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Omit<import("vue").HTMLAttributes, keyof import("..").ChartProps> & import("..").ChartProps>>, {}>;
1
+ declare const IxChart: import("vue-demi").DefineComponent<Omit<import("vue-demi").HTMLAttributes, keyof import("..").ChartProps> & import("..").ChartProps, {}, {}, {}, {}, import("vue-demi").ComponentOptionsMixin, import("vue-demi").ComponentOptionsMixin, {}, string, import("vue-demi").VNodeProps & import("vue-demi").AllowedComponentProps & import("vue-demi").ComponentCustomProps, Readonly<import("vue-demi").ExtractPropTypes<Omit<import("vue-demi").HTMLAttributes, keyof import("..").ChartProps> & import("..").ChartProps>>, {}, {}>;
2
2
  export { IxChart };
@@ -1 +1,3 @@
1
1
  export { useChart } from './useChart';
2
+ export { useTooltipsFormatter } from './useTooltips';
3
+ export * from './useStripe';
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @file 柱状图条纹使用
3
+ */
4
+ import { type BarSeriesOption } from 'echarts/charts';
5
+ export declare function useStripe({ data, color, offset, rotate, size, }: {
6
+ data: number[];
7
+ color: string;
8
+ size?: [number, number];
9
+ offset?: [number, number];
10
+ rotate?: number;
11
+ }): BarSeriesOption;
12
+ export declare function useStripeBarTooltip(unit: string): {
13
+ axisPointer: {
14
+ lineStyle: {
15
+ opacity: number;
16
+ };
17
+ };
18
+ formatter: (params: any) => string;
19
+ };
20
+ export declare function useStripeBarSeries({ series, color, offset, rotate, size, }: {
21
+ series: {
22
+ name: string;
23
+ data: number[];
24
+ };
25
+ color: string;
26
+ offset?: [number, number];
27
+ size?: [number, number];
28
+ rotate?: number;
29
+ }): BarSeriesOption[];
30
+ export declare function useStripeArea(): {
31
+ aria: {
32
+ enabled: boolean;
33
+ decal: {
34
+ show: boolean;
35
+ decals: {
36
+ color: string;
37
+ dashArrayX: number[];
38
+ dashArrayY: number[];
39
+ symbolSize: number;
40
+ rotation: number;
41
+ }[];
42
+ };
43
+ };
44
+ };
@@ -0,0 +1,6 @@
1
+ export interface TooltipsFormatItem {
2
+ name: string;
3
+ value: string | number;
4
+ color?: string;
5
+ }
6
+ export declare function useTooltipsFormatter(title: string, list: TooltipsFormatItem[]): string;
package/dist/index.js CHANGED
@@ -1,83 +1,85 @@
1
- import { DataZoomComponent as G, LegendComponent as M, GridComponent as j, TitleComponent as N, TooltipComponent as V } from "echarts/components";
2
- import { LabelLayout as H, UniversalTransition as P } from "echarts/features";
3
- import { SVGRenderer as U } from "echarts/renderers";
4
- import { watch as C, shallowRef as g, computed as p, unref as f, onMounted as Z, onBeforeUnmount as _, watchEffect as y, isVue2 as z, defineComponent as q, h as $ } from "vue-demi";
5
- import { throttle as J, init as K, use as Q, registerTheme as X } from "echarts/core";
6
- import { isEqual as Y, cloneDeep as R, isBoolean as k, isNil as ee } from "lodash-es";
7
- function te(e, o, r) {
8
- let t;
1
+ import { DataZoomComponent as tt, LegendComponent as et, GridComponent as rt, TitleComponent as nt, TooltipComponent as it } from "echarts/components";
2
+ import { LabelLayout as at, UniversalTransition as ot } from "echarts/features";
3
+ import { SVGRenderer as st } from "echarts/renderers";
4
+ import { watch as C, shallowRef as k, computed as x, unref as b, onMounted as ft, onBeforeUnmount as ht, watchEffect as N, isVue2 as _, defineComponent as ut, h as ct } from "vue-demi";
5
+ import { throttle as lt, use as Z, init as dt, registerTheme as gt } from "echarts/core";
6
+ import { isEqual as pt, cloneDeep as P, isBoolean as bt, isNil as vt } from "lodash-es";
7
+ import { PictorialBarChart as mt } from "echarts/charts";
8
+ function yt(e, t, r) {
9
+ let n;
9
10
  C(
10
- [e, o, r],
11
- ([s, n, a], c, u) => {
12
- !s || !n || (a ? (t ?? (t = J(() => n.resize(), 16)), oe(s, t)) : S(s, t), u(() => S(s, t)));
11
+ [e, t, r],
12
+ ([i, a, o], s, f) => {
13
+ !i || !a || (o ? (n ?? (n = lt(() => a.resize(), 16)), xt(i, n)) : W(i, n), f(() => W(i, n)));
13
14
  }
14
15
  );
15
16
  }
16
- const h = /* @__PURE__ */ new Map();
17
- function oe(e, o, r) {
18
- if (!(!e || !o))
19
- if (h.has(e))
20
- h.get(e).listeners.push(o);
17
+ const F = /* @__PURE__ */ new Map();
18
+ function xt(e, t, r) {
19
+ if (!(!e || !t))
20
+ if (F.has(e))
21
+ F.get(e).listeners.push(t);
21
22
  else {
22
- const t = [o], s = new ResizeObserver((n) => {
23
- n.forEach((a) => t.forEach((c) => c(a)));
23
+ const n = [t], i = new ResizeObserver((a) => {
24
+ a.forEach((o) => n.forEach((s) => s(o)));
24
25
  });
25
- s.observe(e, r), h.set(e, { listeners: t, ro: s });
26
+ i.observe(e, r), F.set(e, { listeners: n, ro: i });
26
27
  }
27
28
  }
28
- function S(e, o) {
29
- if (!e || !o || !h.has(e))
29
+ function W(e, t) {
30
+ if (!e || !t || !F.has(e))
30
31
  return;
31
- const { listeners: r, ro: t } = h.get(e), s = r.indexOf(o);
32
- s > -1 && (r.splice(s, 1), r.length === 0 && (t.disconnect(), h.delete(e)));
32
+ const { listeners: r, ro: n } = F.get(e), i = r.indexOf(t);
33
+ i > -1 && (r.splice(i, 1), r.length === 0 && (n.disconnect(), F.delete(e)));
33
34
  }
34
- const w = { text: "加载中..." };
35
- function ne(e, o) {
36
- const r = g(), t = g(), s = g(), n = p(() => f(e).autoResize ?? !0), a = p(() => f(e).group), c = p(() => f(e).initOption), u = p(() => f(e).loading), d = p(() => f(e).setOptionOpts), x = p(() => f(e).theme ?? "seer"), v = () => {
35
+ Z([mt]);
36
+ const j = { text: "加载中..." };
37
+ function Ft(e, t) {
38
+ const r = k(), n = k(), i = k(), a = x(() => b(e).autoResize ?? !0), o = x(() => b(e).group), s = x(() => b(e).initOption), f = x(() => b(e).loading), p = x(() => b(e).setOptionOpts), S = x(() => b(e).theme ?? "seer"), M = () => {
37
39
  const l = r.value;
38
40
  if (!l)
39
41
  return;
40
- const i = K(l, x.value, c.value), F = f(e), { restOptions: D, events: T } = L(F, o, !1);
41
- i.setOption(D, d.value), s.value = R(D), T.forEach(([E, A, W]) => {
42
- let m = A;
43
- W && (m = (...I) => {
44
- A(...I), i.off(E, m);
45
- }), i.on(E, m);
42
+ const c = dt(l, S.value, s.value), y = b(e), { restOptions: D, events: J } = G(y, t, !1);
43
+ c.setOption(D, p.value), i.value = P(D), J.forEach(([z, L, K]) => {
44
+ let R = L;
45
+ K && (R = (...Q) => {
46
+ L(...Q), c.off(z, R);
47
+ }), c.on(z, R);
46
48
  });
47
- const b = F.onReady || (o == null ? void 0 : o.ready);
48
- b && b(i), t.value = i;
49
- }, O = () => {
50
- t.value && (t.value.dispose(), t.value = void 0);
49
+ const I = y.onReady || (t == null ? void 0 : t.ready);
50
+ I && I(c), n.value = c;
51
+ }, B = () => {
52
+ n.value && (n.value.dispose(), n.value = void 0);
51
53
  };
52
- return Z(() => v()), _(() => O()), C(
53
- () => f(e),
54
+ return ft(() => M()), ht(() => B()), C(
55
+ () => b(e),
54
56
  (l) => {
55
- const i = t.value;
56
- if (!i)
57
+ const c = n.value;
58
+ if (!c)
57
59
  return;
58
- const { restOptions: F } = L(l);
59
- Y(F, s.value) || (i.setOption(F, d.value), s.value = R(F));
60
+ const { restOptions: y } = G(l);
61
+ pt(y, i.value) || (c.setOption(y, p.value), i.value = P(y));
60
62
  },
61
63
  {
62
64
  deep: !0
63
65
  }
64
- ), C([x, c], () => {
65
- O(), v();
66
- }), y(() => {
67
- const l = a.value;
68
- l && t.value && (t.value.group = l);
69
- }), y(() => {
70
- const l = t.value;
66
+ ), C([S, s], () => {
67
+ B(), M();
68
+ }), N(() => {
69
+ const l = o.value;
70
+ l && n.value && (n.value.group = l);
71
+ }), N(() => {
72
+ const l = n.value;
71
73
  if (!l)
72
74
  return;
73
- const i = u.value;
74
- i ? l.showLoading(k(i) ? w : { ...w, ...i }) : l.hideLoading();
75
- }), te(r, t, n), { containerRef: r, chartRef: t };
75
+ const c = f.value;
76
+ c ? l.showLoading(bt(c) ? j : { ...j, ...c }) : l.hideLoading();
77
+ }), yt(r, n, a), { containerRef: r, chartRef: n };
76
78
  }
77
- function re(e) {
79
+ function St(e) {
78
80
  return /^on[^a-z]/.test(e);
79
81
  }
80
- const se = [
82
+ const Mt = [
81
83
  "class",
82
84
  "style",
83
85
  "autoResize",
@@ -87,53 +89,675 @@ const se = [
87
89
  "theme",
88
90
  "onReady"
89
91
  ];
90
- function L(e, o = {}, r = !0) {
91
- const t = {}, s = [];
92
- return Object.keys(e).forEach((n) => {
93
- if (!se.includes(n)) {
94
- if (re(n)) {
92
+ function G(e, t = {}, r = !0) {
93
+ const n = {}, i = [];
94
+ return Object.keys(e).forEach((a) => {
95
+ if (!Mt.includes(a)) {
96
+ if (St(a)) {
95
97
  if (r)
96
98
  return;
97
- const a = e[n];
98
- if (a) {
99
- const c = n.endsWith("Once"), u = c ? n.length - 4 : void 0, d = n.charAt(2).toLowerCase() + n.substring(3, u);
100
- s.push([d, a, c]);
99
+ const o = e[a];
100
+ if (o) {
101
+ const s = a.endsWith("Once"), f = s ? a.length - 4 : void 0, p = a.charAt(2).toLowerCase() + a.substring(3, f);
102
+ i.push([p, o, s]);
101
103
  }
102
104
  return;
103
105
  }
104
- t[n] = e[n];
106
+ n[a] = e[a];
105
107
  }
106
- }), z && !r && Object.keys(o).forEach((n) => {
107
- if (n !== "ready")
108
+ }), _ && !r && Object.keys(t).forEach((a) => {
109
+ if (a !== "ready")
108
110
  return;
109
- const a = o[n];
110
- if (a) {
111
- const c = n.startsWith("~"), u = c ? 1 : 0, d = n.substring(u);
112
- s.push([d, a, c]);
111
+ const o = t[a];
112
+ if (o) {
113
+ const s = a.startsWith("~"), f = s ? 1 : 0, p = a.substring(f);
114
+ i.push([p, o, s]);
113
115
  }
114
- }), { restOptions: t, events: s };
116
+ }), { restOptions: n, events: i };
117
+ }
118
+ function At(e, t) {
119
+ return `
120
+ <div class="charts-tooltips">
121
+ <div class="charts-tooltips-title">${e}</div>
122
+ ${t.map((r) => `
123
+ <div class="charts-tooltips-item">
124
+ <span class="charts-tooltips-item-border" style="background: ${r.color}"></span>
125
+ <span class="charts-tooltips-item-name">${r.name}</span>
126
+ <span class="charts-tooltips-item-value">${r.value}</span>
127
+ </div>`).join("")}
128
+ </div>`;
129
+ }
130
+ function wt({
131
+ data: e = [],
132
+ color: t = "",
133
+ offset: r = [0, 0],
134
+ rotate: n = -20,
135
+ size: i = [2, 8]
136
+ }) {
137
+ return {
138
+ // 分隔线
139
+ name: "",
140
+ data: e,
141
+ // @ts-ignore
142
+ type: "pictorialBar",
143
+ symbolRotate: n,
144
+ silent: !0,
145
+ itemStyle: {
146
+ color: t,
147
+ opacity: 0
148
+ },
149
+ emphasis: {
150
+ itemStyle: {
151
+ opacity: 1
152
+ }
153
+ },
154
+ symbolRepeat: "fixed",
155
+ symbolMargin: 2,
156
+ symbol: "rect",
157
+ symbolClip: !0,
158
+ symbolSize: i,
159
+ symbolPosition: "start",
160
+ symbolOffset: r,
161
+ z: 1,
162
+ animationEasing: "elasticOut"
163
+ };
164
+ }
165
+ function Xt(e) {
166
+ return {
167
+ axisPointer: {
168
+ lineStyle: {
169
+ opacity: 0.6
170
+ }
171
+ },
172
+ formatter: function(t) {
173
+ if (!(t != null && t.length))
174
+ return "";
175
+ const r = t[0].name, n = t.filter((i) => !!i.seriesName).map((i) => ({
176
+ name: i.seriesName,
177
+ value: `${i.value} ${e}`,
178
+ color: i.color
179
+ }));
180
+ return At(r, n);
181
+ }
182
+ };
115
183
  }
116
- const B = q({
184
+ function Yt({
185
+ series: e,
186
+ color: t,
187
+ offset: r = [0, 0],
188
+ rotate: n,
189
+ size: i
190
+ }) {
191
+ return [
192
+ {
193
+ type: "bar",
194
+ z: 0,
195
+ ...e
196
+ },
197
+ wt({
198
+ data: e.data,
199
+ offset: r,
200
+ color: t,
201
+ rotate: n,
202
+ size: i
203
+ })
204
+ ];
205
+ }
206
+ function Jt() {
207
+ return {
208
+ aria: {
209
+ enabled: !0,
210
+ decal: {
211
+ show: !0,
212
+ decals: [
213
+ {
214
+ color: "white",
215
+ dashArrayX: [1, 0],
216
+ // 这个一般不用调增
217
+ dashArrayY: [6, 0],
218
+ // 调整 [x, y] 中 x 的值可以调整条纹的密度
219
+ symbolSize: 0.5,
220
+ // 这个值越大,白色条纹就越宽。0.5 的时候则是平均分
221
+ rotation: Math.PI / 2
222
+ // 这个让条纹保持竖向
223
+ }
224
+ ]
225
+ }
226
+ }
227
+ };
228
+ }
229
+ const X = ut({
117
230
  name: "IxChart",
118
231
  inheritAttrs: !1,
119
232
  // @ts-ignore
120
- setup(e, { attrs: o, listeners: r }) {
121
- const { containerRef: t } = ne(o, r);
122
- return { containerRef: t };
233
+ setup(e, { attrs: t, listeners: r }) {
234
+ const { containerRef: n } = Ft(t, r);
235
+ return { containerRef: n };
123
236
  },
124
237
  render() {
125
- const { class: e, style: o } = this.$attrs;
126
- return $("div", {
238
+ const { class: e, style: t } = this.$attrs;
239
+ return ct("div", {
127
240
  ref: "containerRef",
128
241
  class: e,
129
242
  style: {
130
243
  width: "100%",
131
244
  height: "100%",
132
- ...o
245
+ ...t
133
246
  }
134
247
  });
135
248
  }
136
- }), ie = [
249
+ });
250
+ function h(e, t) {
251
+ Rt(e) && (e = "100%");
252
+ var r = kt(e);
253
+ return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), r && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
254
+ }
255
+ function A(e) {
256
+ return Math.min(1, Math.max(0, e));
257
+ }
258
+ function Rt(e) {
259
+ return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
260
+ }
261
+ function kt(e) {
262
+ return typeof e == "string" && e.indexOf("%") !== -1;
263
+ }
264
+ function Y(e) {
265
+ return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
266
+ }
267
+ function w(e) {
268
+ return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
269
+ }
270
+ function m(e) {
271
+ return e.length === 1 ? "0" + e : String(e);
272
+ }
273
+ function Ht(e, t, r) {
274
+ return {
275
+ r: h(e, 255) * 255,
276
+ g: h(t, 255) * 255,
277
+ b: h(r, 255) * 255
278
+ };
279
+ }
280
+ function $(e, t, r) {
281
+ e = h(e, 255), t = h(t, 255), r = h(r, 255);
282
+ var n = Math.max(e, t, r), i = Math.min(e, t, r), a = 0, o = 0, s = (n + i) / 2;
283
+ if (n === i)
284
+ o = 0, a = 0;
285
+ else {
286
+ var f = n - i;
287
+ switch (o = s > 0.5 ? f / (2 - n - i) : f / (n + i), n) {
288
+ case e:
289
+ a = (t - r) / f + (t < r ? 6 : 0);
290
+ break;
291
+ case t:
292
+ a = (r - e) / f + 2;
293
+ break;
294
+ case r:
295
+ a = (e - t) / f + 4;
296
+ break;
297
+ }
298
+ a /= 6;
299
+ }
300
+ return { h: a, s: o, l: s };
301
+ }
302
+ function H(e, t, r) {
303
+ return r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? e + (t - e) * (6 * r) : r < 1 / 2 ? t : r < 2 / 3 ? e + (t - e) * (2 / 3 - r) * 6 : e;
304
+ }
305
+ function Et(e, t, r) {
306
+ var n, i, a;
307
+ if (e = h(e, 360), t = h(t, 100), r = h(r, 100), t === 0)
308
+ i = r, a = r, n = r;
309
+ else {
310
+ var o = r < 0.5 ? r * (1 + t) : r + t - r * t, s = 2 * r - o;
311
+ n = H(s, o, e + 1 / 3), i = H(s, o, e), a = H(s, o, e - 1 / 3);
312
+ }
313
+ return { r: n * 255, g: i * 255, b: a * 255 };
314
+ }
315
+ function q(e, t, r) {
316
+ e = h(e, 255), t = h(t, 255), r = h(r, 255);
317
+ var n = Math.max(e, t, r), i = Math.min(e, t, r), a = 0, o = n, s = n - i, f = n === 0 ? 0 : s / n;
318
+ if (n === i)
319
+ a = 0;
320
+ else {
321
+ switch (n) {
322
+ case e:
323
+ a = (t - r) / s + (t < r ? 6 : 0);
324
+ break;
325
+ case t:
326
+ a = (r - e) / s + 2;
327
+ break;
328
+ case r:
329
+ a = (e - t) / s + 4;
330
+ break;
331
+ }
332
+ a /= 6;
333
+ }
334
+ return { h: a, s: f, v: o };
335
+ }
336
+ function Ot(e, t, r) {
337
+ e = h(e, 360) * 6, t = h(t, 100), r = h(r, 100);
338
+ var n = Math.floor(e), i = e - n, a = r * (1 - t), o = r * (1 - i * t), s = r * (1 - (1 - i) * t), f = n % 6, p = [r, o, a, a, s, r][f], S = [s, r, r, o, a, a][f], M = [a, a, s, r, r, o][f];
339
+ return { r: p * 255, g: S * 255, b: M * 255 };
340
+ }
341
+ function U(e, t, r, n) {
342
+ var i = [
343
+ m(Math.round(e).toString(16)),
344
+ m(Math.round(t).toString(16)),
345
+ m(Math.round(r).toString(16))
346
+ ];
347
+ return n && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
348
+ }
349
+ function Ct(e, t, r, n, i) {
350
+ var a = [
351
+ m(Math.round(e).toString(16)),
352
+ m(Math.round(t).toString(16)),
353
+ m(Math.round(r).toString(16)),
354
+ m(Tt(n))
355
+ ];
356
+ return i && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
357
+ }
358
+ function Tt(e) {
359
+ return Math.round(parseFloat(e) * 255).toString(16);
360
+ }
361
+ function V(e) {
362
+ return u(e) / 255;
363
+ }
364
+ function u(e) {
365
+ return parseInt(e, 16);
366
+ }
367
+ function Bt(e) {
368
+ return {
369
+ r: e >> 16,
370
+ g: (e & 65280) >> 8,
371
+ b: e & 255
372
+ };
373
+ }
374
+ var T = {
375
+ aliceblue: "#f0f8ff",
376
+ antiquewhite: "#faebd7",
377
+ aqua: "#00ffff",
378
+ aquamarine: "#7fffd4",
379
+ azure: "#f0ffff",
380
+ beige: "#f5f5dc",
381
+ bisque: "#ffe4c4",
382
+ black: "#000000",
383
+ blanchedalmond: "#ffebcd",
384
+ blue: "#0000ff",
385
+ blueviolet: "#8a2be2",
386
+ brown: "#a52a2a",
387
+ burlywood: "#deb887",
388
+ cadetblue: "#5f9ea0",
389
+ chartreuse: "#7fff00",
390
+ chocolate: "#d2691e",
391
+ coral: "#ff7f50",
392
+ cornflowerblue: "#6495ed",
393
+ cornsilk: "#fff8dc",
394
+ crimson: "#dc143c",
395
+ cyan: "#00ffff",
396
+ darkblue: "#00008b",
397
+ darkcyan: "#008b8b",
398
+ darkgoldenrod: "#b8860b",
399
+ darkgray: "#a9a9a9",
400
+ darkgreen: "#006400",
401
+ darkgrey: "#a9a9a9",
402
+ darkkhaki: "#bdb76b",
403
+ darkmagenta: "#8b008b",
404
+ darkolivegreen: "#556b2f",
405
+ darkorange: "#ff8c00",
406
+ darkorchid: "#9932cc",
407
+ darkred: "#8b0000",
408
+ darksalmon: "#e9967a",
409
+ darkseagreen: "#8fbc8f",
410
+ darkslateblue: "#483d8b",
411
+ darkslategray: "#2f4f4f",
412
+ darkslategrey: "#2f4f4f",
413
+ darkturquoise: "#00ced1",
414
+ darkviolet: "#9400d3",
415
+ deeppink: "#ff1493",
416
+ deepskyblue: "#00bfff",
417
+ dimgray: "#696969",
418
+ dimgrey: "#696969",
419
+ dodgerblue: "#1e90ff",
420
+ firebrick: "#b22222",
421
+ floralwhite: "#fffaf0",
422
+ forestgreen: "#228b22",
423
+ fuchsia: "#ff00ff",
424
+ gainsboro: "#dcdcdc",
425
+ ghostwhite: "#f8f8ff",
426
+ goldenrod: "#daa520",
427
+ gold: "#ffd700",
428
+ gray: "#808080",
429
+ green: "#008000",
430
+ greenyellow: "#adff2f",
431
+ grey: "#808080",
432
+ honeydew: "#f0fff0",
433
+ hotpink: "#ff69b4",
434
+ indianred: "#cd5c5c",
435
+ indigo: "#4b0082",
436
+ ivory: "#fffff0",
437
+ khaki: "#f0e68c",
438
+ lavenderblush: "#fff0f5",
439
+ lavender: "#e6e6fa",
440
+ lawngreen: "#7cfc00",
441
+ lemonchiffon: "#fffacd",
442
+ lightblue: "#add8e6",
443
+ lightcoral: "#f08080",
444
+ lightcyan: "#e0ffff",
445
+ lightgoldenrodyellow: "#fafad2",
446
+ lightgray: "#d3d3d3",
447
+ lightgreen: "#90ee90",
448
+ lightgrey: "#d3d3d3",
449
+ lightpink: "#ffb6c1",
450
+ lightsalmon: "#ffa07a",
451
+ lightseagreen: "#20b2aa",
452
+ lightskyblue: "#87cefa",
453
+ lightslategray: "#778899",
454
+ lightslategrey: "#778899",
455
+ lightsteelblue: "#b0c4de",
456
+ lightyellow: "#ffffe0",
457
+ lime: "#00ff00",
458
+ limegreen: "#32cd32",
459
+ linen: "#faf0e6",
460
+ magenta: "#ff00ff",
461
+ maroon: "#800000",
462
+ mediumaquamarine: "#66cdaa",
463
+ mediumblue: "#0000cd",
464
+ mediumorchid: "#ba55d3",
465
+ mediumpurple: "#9370db",
466
+ mediumseagreen: "#3cb371",
467
+ mediumslateblue: "#7b68ee",
468
+ mediumspringgreen: "#00fa9a",
469
+ mediumturquoise: "#48d1cc",
470
+ mediumvioletred: "#c71585",
471
+ midnightblue: "#191970",
472
+ mintcream: "#f5fffa",
473
+ mistyrose: "#ffe4e1",
474
+ moccasin: "#ffe4b5",
475
+ navajowhite: "#ffdead",
476
+ navy: "#000080",
477
+ oldlace: "#fdf5e6",
478
+ olive: "#808000",
479
+ olivedrab: "#6b8e23",
480
+ orange: "#ffa500",
481
+ orangered: "#ff4500",
482
+ orchid: "#da70d6",
483
+ palegoldenrod: "#eee8aa",
484
+ palegreen: "#98fb98",
485
+ paleturquoise: "#afeeee",
486
+ palevioletred: "#db7093",
487
+ papayawhip: "#ffefd5",
488
+ peachpuff: "#ffdab9",
489
+ peru: "#cd853f",
490
+ pink: "#ffc0cb",
491
+ plum: "#dda0dd",
492
+ powderblue: "#b0e0e6",
493
+ purple: "#800080",
494
+ rebeccapurple: "#663399",
495
+ red: "#ff0000",
496
+ rosybrown: "#bc8f8f",
497
+ royalblue: "#4169e1",
498
+ saddlebrown: "#8b4513",
499
+ salmon: "#fa8072",
500
+ sandybrown: "#f4a460",
501
+ seagreen: "#2e8b57",
502
+ seashell: "#fff5ee",
503
+ sienna: "#a0522d",
504
+ silver: "#c0c0c0",
505
+ skyblue: "#87ceeb",
506
+ slateblue: "#6a5acd",
507
+ slategray: "#708090",
508
+ slategrey: "#708090",
509
+ snow: "#fffafa",
510
+ springgreen: "#00ff7f",
511
+ steelblue: "#4682b4",
512
+ tan: "#d2b48c",
513
+ teal: "#008080",
514
+ thistle: "#d8bfd8",
515
+ tomato: "#ff6347",
516
+ turquoise: "#40e0d0",
517
+ violet: "#ee82ee",
518
+ wheat: "#f5deb3",
519
+ white: "#ffffff",
520
+ whitesmoke: "#f5f5f5",
521
+ yellow: "#ffff00",
522
+ yellowgreen: "#9acd32"
523
+ };
524
+ function Dt(e) {
525
+ var t = { r: 0, g: 0, b: 0 }, r = 1, n = null, i = null, a = null, o = !1, s = !1;
526
+ return typeof e == "string" && (e = Lt(e)), typeof e == "object" && (g(e.r) && g(e.g) && g(e.b) ? (t = Ht(e.r, e.g, e.b), o = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : g(e.h) && g(e.s) && g(e.v) ? (n = w(e.s), i = w(e.v), t = Ot(e.h, n, i), o = !0, s = "hsv") : g(e.h) && g(e.s) && g(e.l) && (n = w(e.s), a = w(e.l), t = Et(e.h, n, a), o = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (r = e.a)), r = Y(r), {
527
+ ok: o,
528
+ format: e.format || s,
529
+ r: Math.min(255, Math.max(t.r, 0)),
530
+ g: Math.min(255, Math.max(t.g, 0)),
531
+ b: Math.min(255, Math.max(t.b, 0)),
532
+ a: r
533
+ };
534
+ }
535
+ var It = "[-\\+]?\\d+%?", zt = "[-\\+]?\\d*\\.\\d+%?", v = "(?:".concat(zt, ")|(?:").concat(It, ")"), E = "[\\s|\\(]+(".concat(v, ")[,|\\s]+(").concat(v, ")[,|\\s]+(").concat(v, ")\\s*\\)?"), O = "[\\s|\\(]+(".concat(v, ")[,|\\s]+(").concat(v, ")[,|\\s]+(").concat(v, ")[,|\\s]+(").concat(v, ")\\s*\\)?"), d = {
536
+ CSS_UNIT: new RegExp(v),
537
+ rgb: new RegExp("rgb" + E),
538
+ rgba: new RegExp("rgba" + O),
539
+ hsl: new RegExp("hsl" + E),
540
+ hsla: new RegExp("hsla" + O),
541
+ hsv: new RegExp("hsv" + E),
542
+ hsva: new RegExp("hsva" + O),
543
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
544
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
545
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
546
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
547
+ };
548
+ function Lt(e) {
549
+ if (e = e.trim().toLowerCase(), e.length === 0)
550
+ return !1;
551
+ var t = !1;
552
+ if (T[e])
553
+ e = T[e], t = !0;
554
+ else if (e === "transparent")
555
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
556
+ var r = d.rgb.exec(e);
557
+ return r ? { r: r[1], g: r[2], b: r[3] } : (r = d.rgba.exec(e), r ? { r: r[1], g: r[2], b: r[3], a: r[4] } : (r = d.hsl.exec(e), r ? { h: r[1], s: r[2], l: r[3] } : (r = d.hsla.exec(e), r ? { h: r[1], s: r[2], l: r[3], a: r[4] } : (r = d.hsv.exec(e), r ? { h: r[1], s: r[2], v: r[3] } : (r = d.hsva.exec(e), r ? { h: r[1], s: r[2], v: r[3], a: r[4] } : (r = d.hex8.exec(e), r ? {
558
+ r: u(r[1]),
559
+ g: u(r[2]),
560
+ b: u(r[3]),
561
+ a: V(r[4]),
562
+ format: t ? "name" : "hex8"
563
+ } : (r = d.hex6.exec(e), r ? {
564
+ r: u(r[1]),
565
+ g: u(r[2]),
566
+ b: u(r[3]),
567
+ format: t ? "name" : "hex"
568
+ } : (r = d.hex4.exec(e), r ? {
569
+ r: u(r[1] + r[1]),
570
+ g: u(r[2] + r[2]),
571
+ b: u(r[3] + r[3]),
572
+ a: V(r[4] + r[4]),
573
+ format: t ? "name" : "hex8"
574
+ } : (r = d.hex3.exec(e), r ? {
575
+ r: u(r[1] + r[1]),
576
+ g: u(r[2] + r[2]),
577
+ b: u(r[3] + r[3]),
578
+ format: t ? "name" : "hex"
579
+ } : !1)))))))));
580
+ }
581
+ function g(e) {
582
+ return Boolean(d.CSS_UNIT.exec(String(e)));
583
+ }
584
+ var Nt = (
585
+ /** @class */
586
+ function() {
587
+ function e(t, r) {
588
+ t === void 0 && (t = ""), r === void 0 && (r = {});
589
+ var n;
590
+ if (t instanceof e)
591
+ return t;
592
+ typeof t == "number" && (t = Bt(t)), this.originalInput = t;
593
+ var i = Dt(t);
594
+ this.originalInput = t, this.r = i.r, this.g = i.g, this.b = i.b, this.a = i.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (n = r.format) !== null && n !== void 0 ? n : i.format, this.gradientType = r.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = i.ok;
595
+ }
596
+ return e.prototype.isDark = function() {
597
+ return this.getBrightness() < 128;
598
+ }, e.prototype.isLight = function() {
599
+ return !this.isDark();
600
+ }, e.prototype.getBrightness = function() {
601
+ var t = this.toRgb();
602
+ return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
603
+ }, e.prototype.getLuminance = function() {
604
+ var t = this.toRgb(), r, n, i, a = t.r / 255, o = t.g / 255, s = t.b / 255;
605
+ return a <= 0.03928 ? r = a / 12.92 : r = Math.pow((a + 0.055) / 1.055, 2.4), o <= 0.03928 ? n = o / 12.92 : n = Math.pow((o + 0.055) / 1.055, 2.4), s <= 0.03928 ? i = s / 12.92 : i = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * r + 0.7152 * n + 0.0722 * i;
606
+ }, e.prototype.getAlpha = function() {
607
+ return this.a;
608
+ }, e.prototype.setAlpha = function(t) {
609
+ return this.a = Y(t), this.roundA = Math.round(100 * this.a) / 100, this;
610
+ }, e.prototype.isMonochrome = function() {
611
+ var t = this.toHsl().s;
612
+ return t === 0;
613
+ }, e.prototype.toHsv = function() {
614
+ var t = q(this.r, this.g, this.b);
615
+ return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
616
+ }, e.prototype.toHsvString = function() {
617
+ var t = q(this.r, this.g, this.b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), i = Math.round(t.v * 100);
618
+ return this.a === 1 ? "hsv(".concat(r, ", ").concat(n, "%, ").concat(i, "%)") : "hsva(".concat(r, ", ").concat(n, "%, ").concat(i, "%, ").concat(this.roundA, ")");
619
+ }, e.prototype.toHsl = function() {
620
+ var t = $(this.r, this.g, this.b);
621
+ return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
622
+ }, e.prototype.toHslString = function() {
623
+ var t = $(this.r, this.g, this.b), r = Math.round(t.h * 360), n = Math.round(t.s * 100), i = Math.round(t.l * 100);
624
+ return this.a === 1 ? "hsl(".concat(r, ", ").concat(n, "%, ").concat(i, "%)") : "hsla(".concat(r, ", ").concat(n, "%, ").concat(i, "%, ").concat(this.roundA, ")");
625
+ }, e.prototype.toHex = function(t) {
626
+ return t === void 0 && (t = !1), U(this.r, this.g, this.b, t);
627
+ }, e.prototype.toHexString = function(t) {
628
+ return t === void 0 && (t = !1), "#" + this.toHex(t);
629
+ }, e.prototype.toHex8 = function(t) {
630
+ return t === void 0 && (t = !1), Ct(this.r, this.g, this.b, this.a, t);
631
+ }, e.prototype.toHex8String = function(t) {
632
+ return t === void 0 && (t = !1), "#" + this.toHex8(t);
633
+ }, e.prototype.toHexShortString = function(t) {
634
+ return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
635
+ }, e.prototype.toRgb = function() {
636
+ return {
637
+ r: Math.round(this.r),
638
+ g: Math.round(this.g),
639
+ b: Math.round(this.b),
640
+ a: this.a
641
+ };
642
+ }, e.prototype.toRgbString = function() {
643
+ var t = Math.round(this.r), r = Math.round(this.g), n = Math.round(this.b);
644
+ return this.a === 1 ? "rgb(".concat(t, ", ").concat(r, ", ").concat(n, ")") : "rgba(".concat(t, ", ").concat(r, ", ").concat(n, ", ").concat(this.roundA, ")");
645
+ }, e.prototype.toPercentageRgb = function() {
646
+ var t = function(r) {
647
+ return "".concat(Math.round(h(r, 255) * 100), "%");
648
+ };
649
+ return {
650
+ r: t(this.r),
651
+ g: t(this.g),
652
+ b: t(this.b),
653
+ a: this.a
654
+ };
655
+ }, e.prototype.toPercentageRgbString = function() {
656
+ var t = function(r) {
657
+ return Math.round(h(r, 255) * 100);
658
+ };
659
+ return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
660
+ }, e.prototype.toName = function() {
661
+ if (this.a === 0)
662
+ return "transparent";
663
+ if (this.a < 1)
664
+ return !1;
665
+ for (var t = "#" + U(this.r, this.g, this.b, !1), r = 0, n = Object.entries(T); r < n.length; r++) {
666
+ var i = n[r], a = i[0], o = i[1];
667
+ if (t === o)
668
+ return a;
669
+ }
670
+ return !1;
671
+ }, e.prototype.toString = function(t) {
672
+ var r = Boolean(t);
673
+ t = t ?? this.format;
674
+ var n = !1, i = this.a < 1 && this.a >= 0, a = !r && i && (t.startsWith("hex") || t === "name");
675
+ return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (n = this.toRgbString()), t === "prgb" && (n = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (n = this.toHexString()), t === "hex3" && (n = this.toHexString(!0)), t === "hex4" && (n = this.toHex8String(!0)), t === "hex8" && (n = this.toHex8String()), t === "name" && (n = this.toName()), t === "hsl" && (n = this.toHslString()), t === "hsv" && (n = this.toHsvString()), n || this.toHexString());
676
+ }, e.prototype.toNumber = function() {
677
+ return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
678
+ }, e.prototype.clone = function() {
679
+ return new e(this.toString());
680
+ }, e.prototype.lighten = function(t) {
681
+ t === void 0 && (t = 10);
682
+ var r = this.toHsl();
683
+ return r.l += t / 100, r.l = A(r.l), new e(r);
684
+ }, e.prototype.brighten = function(t) {
685
+ t === void 0 && (t = 10);
686
+ var r = this.toRgb();
687
+ return r.r = Math.max(0, Math.min(255, r.r - Math.round(255 * -(t / 100)))), r.g = Math.max(0, Math.min(255, r.g - Math.round(255 * -(t / 100)))), r.b = Math.max(0, Math.min(255, r.b - Math.round(255 * -(t / 100)))), new e(r);
688
+ }, e.prototype.darken = function(t) {
689
+ t === void 0 && (t = 10);
690
+ var r = this.toHsl();
691
+ return r.l -= t / 100, r.l = A(r.l), new e(r);
692
+ }, e.prototype.tint = function(t) {
693
+ return t === void 0 && (t = 10), this.mix("white", t);
694
+ }, e.prototype.shade = function(t) {
695
+ return t === void 0 && (t = 10), this.mix("black", t);
696
+ }, e.prototype.desaturate = function(t) {
697
+ t === void 0 && (t = 10);
698
+ var r = this.toHsl();
699
+ return r.s -= t / 100, r.s = A(r.s), new e(r);
700
+ }, e.prototype.saturate = function(t) {
701
+ t === void 0 && (t = 10);
702
+ var r = this.toHsl();
703
+ return r.s += t / 100, r.s = A(r.s), new e(r);
704
+ }, e.prototype.greyscale = function() {
705
+ return this.desaturate(100);
706
+ }, e.prototype.spin = function(t) {
707
+ var r = this.toHsl(), n = (r.h + t) % 360;
708
+ return r.h = n < 0 ? 360 + n : n, new e(r);
709
+ }, e.prototype.mix = function(t, r) {
710
+ r === void 0 && (r = 50);
711
+ var n = this.toRgb(), i = new e(t).toRgb(), a = r / 100, o = {
712
+ r: (i.r - n.r) * a + n.r,
713
+ g: (i.g - n.g) * a + n.g,
714
+ b: (i.b - n.b) * a + n.b,
715
+ a: (i.a - n.a) * a + n.a
716
+ };
717
+ return new e(o);
718
+ }, e.prototype.analogous = function(t, r) {
719
+ t === void 0 && (t = 6), r === void 0 && (r = 30);
720
+ var n = this.toHsl(), i = 360 / r, a = [this];
721
+ for (n.h = (n.h - (i * t >> 1) + 720) % 360; --t; )
722
+ n.h = (n.h + i) % 360, a.push(new e(n));
723
+ return a;
724
+ }, e.prototype.complement = function() {
725
+ var t = this.toHsl();
726
+ return t.h = (t.h + 180) % 360, new e(t);
727
+ }, e.prototype.monochromatic = function(t) {
728
+ t === void 0 && (t = 6);
729
+ for (var r = this.toHsv(), n = r.h, i = r.s, a = r.v, o = [], s = 1 / t; t--; )
730
+ o.push(new e({ h: n, s: i, v: a })), a = (a + s) % 1;
731
+ return o;
732
+ }, e.prototype.splitcomplement = function() {
733
+ var t = this.toHsl(), r = t.h;
734
+ return [
735
+ this,
736
+ new e({ h: (r + 72) % 360, s: t.s, l: t.l }),
737
+ new e({ h: (r + 216) % 360, s: t.s, l: t.l })
738
+ ];
739
+ }, e.prototype.onBackground = function(t) {
740
+ var r = this.toRgb(), n = new e(t).toRgb(), i = r.a + n.a * (1 - r.a);
741
+ return new e({
742
+ r: (r.r * r.a + n.r * n.a * (1 - r.a)) / i,
743
+ g: (r.g * r.a + n.g * n.a * (1 - r.a)) / i,
744
+ b: (r.b * r.a + n.b * n.a * (1 - r.a)) / i,
745
+ a: i
746
+ });
747
+ }, e.prototype.triad = function() {
748
+ return this.polyad(3);
749
+ }, e.prototype.tetrad = function() {
750
+ return this.polyad(4);
751
+ }, e.prototype.polyad = function(t) {
752
+ for (var r = this.toHsl(), n = r.h, i = [this], a = 360 / t, o = 1; o < t; o++)
753
+ i.push(new e({ h: (n + o * a) % 360, s: r.s, l: r.l }));
754
+ return i;
755
+ }, e.prototype.equals = function(t) {
756
+ return this.toRgbString() === new e(t).toRgbString();
757
+ }, e;
758
+ }()
759
+ );
760
+ const Pt = [
137
761
  "#458FFF",
138
762
  "#45D9A3",
139
763
  "#FFC145",
@@ -145,7 +769,7 @@ const B = q({
145
769
  "#F587B3",
146
770
  "#8352CC",
147
771
  "#65779B"
148
- ], he = [
772
+ ], Kt = [
149
773
  "#458FFF",
150
774
  "#C8DEFF",
151
775
  "#45D9A3",
@@ -168,7 +792,7 @@ const B = q({
168
792
  "#FCDBE8",
169
793
  "#65779B",
170
794
  "#65779B"
171
- ], me = [
795
+ ], Qt = [
172
796
  "#8C1604",
173
797
  "#DB4C35",
174
798
  "#FF9245",
@@ -176,8 +800,8 @@ const B = q({
176
800
  "#689FFF",
177
801
  "#45D9A3",
178
802
  "#99ACD1"
179
- ], ae = {
180
- color: ie,
803
+ ], Wt = {
804
+ color: Pt,
181
805
  textStyle: {
182
806
  color: "#2F3540",
183
807
  fontSize: "12px"
@@ -295,46 +919,53 @@ const B = q({
295
919
  height: 16
296
920
  }
297
921
  };
298
- function ge(e) {
922
+ function te(e) {
299
923
  return !!(e && e.xAxis && e.xAxis.data);
300
924
  }
301
- function Ce(e, o) {
302
- return z ? { attrs: { ...e }, on: { ...o } } : { ...e };
925
+ function ee(e, t) {
926
+ return _ ? { attrs: { ...e }, on: { ...t } } : { ...e };
303
927
  }
304
- function xe(e) {
305
- return Object.entries(e).reduce((o, [r, t]) => (t !== void 0 && (o[r] = t), o), {});
928
+ function re(e) {
929
+ return Object.entries(e).reduce((t, [r, n]) => (n !== void 0 && (t[r] = n), t), {});
306
930
  }
307
- function ve(e) {
308
- return ee(e) ? [] : Array.isArray(e) ? e : [e];
931
+ function ne(e) {
932
+ return vt(e) ? [] : Array.isArray(e) ? e : [e];
309
933
  }
310
- function ce(e, o) {
311
- Q(o), X("seer", ae);
312
- const r = (t) => {
313
- t.component(e.name, e);
934
+ const ie = (e, t) => new Nt(e).setAlpha(t).toRgbString();
935
+ function jt(e, t) {
936
+ Z(t), gt("seer", Wt);
937
+ const r = (n) => {
938
+ n.component(e.name, e);
314
939
  };
315
940
  e.install = r;
316
941
  }
317
- ce(B, [
318
- G,
319
- M,
320
- j,
321
- N,
322
- V,
323
- H,
324
- P,
325
- U
942
+ jt(X, [
943
+ tt,
944
+ et,
945
+ rt,
946
+ nt,
947
+ it,
948
+ at,
949
+ ot,
950
+ st
326
951
  ]);
327
- const Oe = B;
952
+ const ae = X;
328
953
  export {
329
- Oe as IxChart,
330
- ve as convertArray,
331
- ce as createInstall,
332
- xe as filterEmptyProps,
333
- ge as isVertical,
334
- Ce as mergeAttrs,
335
- ie as seerColors,
336
- he as seerColorsForMore,
337
- me as seerColorsForRisk,
338
- ae as seerTheme,
339
- ne as useChart
954
+ ae as IxChart,
955
+ ne as convertArray,
956
+ jt as createInstall,
957
+ re as filterEmptyProps,
958
+ ie as getAlphaColor,
959
+ te as isVertical,
960
+ ee as mergeAttrs,
961
+ Pt as seerColors,
962
+ Kt as seerColorsForMore,
963
+ Qt as seerColorsForRisk,
964
+ Wt as seerTheme,
965
+ Ft as useChart,
966
+ wt as useStripe,
967
+ Jt as useStripeArea,
968
+ Yt as useStripeBarSeries,
969
+ Xt as useStripeBarTooltip,
970
+ At as useTooltipsFormatter
340
971
  };
@@ -1 +1,10 @@
1
- (function(o,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("echarts/components"),require("echarts/features"),require("echarts/renderers"),require("vue-demi"),require("echarts/core"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","echarts/components","echarts/features","echarts/renderers","vue-demi","echarts/core","lodash-es"],d):(o=typeof globalThis<"u"?globalThis:o||self,d(o.IduxChartsCore={},o.echarts,o.echarts,o.echarts,o.VueDemi,o.echarts,o._))})(this,function(o,d,y,M,r,O,g){"use strict";function V(e,n,i){let t;r.watch([e,n,i],([a,s,l],f,h)=>{!a||!s||(l?(t??(t=O.throttle(()=>s.resize(),16)),j(a,t)):A(a,t),h(()=>A(a,t)))})}const F=new Map;function j(e,n,i){if(!(!e||!n))if(F.has(e))F.get(e).listeners.push(n);else{const t=[n],a=new ResizeObserver(s=>{s.forEach(l=>t.forEach(f=>f(l)))});a.observe(e,i),F.set(e,{listeners:t,ro:a})}}function A(e,n){if(!e||!n||!F.has(e))return;const{listeners:i,ro:t}=F.get(e),a=i.indexOf(n);a>-1&&(i.splice(a,1),i.length===0&&(t.disconnect(),F.delete(e)))}const w={text:"加载中..."};function E(e,n){const i=r.shallowRef(),t=r.shallowRef(),a=r.shallowRef(),s=r.computed(()=>r.unref(e).autoResize??!0),l=r.computed(()=>r.unref(e).group),f=r.computed(()=>r.unref(e).initOption),h=r.computed(()=>r.unref(e).loading),p=r.computed(()=>r.unref(e).setOptionOpts),z=r.computed(()=>r.unref(e).theme??"seer"),B=()=>{const u=i.value;if(!u)return;const c=O.init(u,z.value,f.value),C=r.unref(e),{restOptions:I,events:J}=R(C,n,!1);c.setOption(I,p.value),a.value=g.cloneDeep(I),J.forEach(([q,v,K])=>{let x=v;K&&(x=(...Q)=>{v(...Q),c.off(q,x)}),c.on(q,x)});const W=C.onReady||(n==null?void 0:n.ready);W&&W(c),t.value=c},T=()=>{t.value&&(t.value.dispose(),t.value=void 0)};return r.onMounted(()=>B()),r.onBeforeUnmount(()=>T()),r.watch(()=>r.unref(e),u=>{const c=t.value;if(!c)return;const{restOptions:C}=R(u);g.isEqual(C,a.value)||(c.setOption(C,p.value),a.value=g.cloneDeep(C))},{deep:!0}),r.watch([z,f],()=>{T(),B()}),r.watchEffect(()=>{const u=l.value;u&&t.value&&(t.value.group=u)}),r.watchEffect(()=>{const u=t.value;if(!u)return;const c=h.value;c?u.showLoading(g.isBoolean(c)?w:{...w,...c}):u.hideLoading()}),V(i,t,s),{containerRef:i,chartRef:t}}function G(e){return/^on[^a-z]/.test(e)}const P=["class","style","autoResize","group","loading","setOptionOpts","theme","onReady"];function R(e,n={},i=!0){const t={},a=[];return Object.keys(e).forEach(s=>{if(!P.includes(s)){if(G(s)){if(i)return;const l=e[s];if(l){const f=s.endsWith("Once"),h=f?s.length-4:void 0,p=s.charAt(2).toLowerCase()+s.substring(3,h);a.push([p,l,f])}return}t[s]=e[s]}}),r.isVue2&&!i&&Object.keys(n).forEach(s=>{if(s!=="ready")return;const l=n[s];if(l){const f=s.startsWith("~"),h=f?1:0,p=s.substring(h);a.push([p,l,f])}}),{restOptions:t,events:a}}const b=r.defineComponent({name:"IxChart",inheritAttrs:!1,setup(e,{attrs:n,listeners:i}){const{containerRef:t}=E(n,i);return{containerRef:t}},render(){const{class:e,style:n}=this.$attrs;return r.h("div",{ref:"containerRef",class:e,style:{width:"100%",height:"100%",...n}})}}),m=["#458FFF","#45D9A3","#FFC145","#F5654F","#6A6AFD","#6ED1FF","#008787","#FF9245","#F587B3","#8352CC","#65779B"],N=["#458FFF","#C8DEFF","#45D9A3","#C8F4E4","#FFC145","#FFEDC8","#F5654F","#FCD1CB","#6A6AFD","#D3D3FE","#6ED1FF","#D3D3FE","#008787","#B3DBDB","#FF9245","#FFDFC8","#F587B3","#FCDBE8","#8352CC","#FCDBE8","#65779B","#65779B"],_=["#8C1604","#DB4C35","#FF9245","#FFC145","#689FFF","#45D9A3","#99ACD1"],S={color:m,textStyle:{color:"#2F3540",fontSize:"12px"},bar:{barGap:.2,barWidth:10,label:{color:"#6F7785",position:"top"}},line:{label:{color:"#6F7785",position:"top"}},pie:{avoidLabelOverlap:!1,radius:["70%","80%"],itemStyle:{borderWidth:1,borderColor:"#fff"},label:{show:!1,color:"#2F3540",formatter:"{c}",position:"inside"}},legend:{itemWidth:12,itemHeight:12,textStyle:{color:"#6F7785",fontSize:"12px"}},title:{itemGap:4,textStyle:{color:"#2F3540",fontSize:"12px",fontWeight:500},subtextStyle:{color:"#6F7785",fontSize:"12px"}},tooltip:{borderWidth:0,padding:12,textStyle:{color:"#2F3540"},axisPointer:{z:1,lineStyle:{type:"solid",color:"#E1E5EB"}}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:"#EDF1F7"}},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:"#EDF1F7"}},axisLabel:{color:"#6F7785"},splitLine:{show:!1},splitArea:{show:!1}},valueAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6F7785"},splitLine:{lineStyle:{color:"#EDF1F7"}},splitArea:{show:!1},nameTextStyle:{color:"#6F7785",padding:[0,30,-4,0]}},dataZoom:{height:16}};function H(e){return!!(e&&e.xAxis&&e.xAxis.data)}function U(e,n){return r.isVue2?{attrs:{...e},on:{...n}}:{...e}}function Z(e){return Object.entries(e).reduce((n,[i,t])=>(t!==void 0&&(n[i]=t),n),{})}function D(e){return g.isNil(e)?[]:Array.isArray(e)?e:[e]}function L(e,n){O.use(n),O.registerTheme("seer",S);const i=t=>{t.component(e.name,e)};e.install=i}L(b,[d.DataZoomComponent,d.LegendComponent,d.GridComponent,d.TitleComponent,d.TooltipComponent,y.LabelLayout,y.UniversalTransition,M.SVGRenderer]);const $=b;o.IxChart=$,o.convertArray=D,o.createInstall=L,o.filterEmptyProps=Z,o.isVertical=H,o.mergeAttrs=U,o.seerColors=m,o.seerColorsForMore=N,o.seerColorsForRisk=_,o.seerTheme=S,o.useChart=E,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
1
+ (function(f,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("echarts/components"),require("echarts/features"),require("echarts/renderers"),require("vue-demi"),require("echarts/core"),require("lodash-es"),require("echarts/charts")):typeof define=="function"&&define.amd?define(["exports","echarts/components","echarts/features","echarts/renderers","vue-demi","echarts/core","lodash-es","echarts/charts"],b):(f=typeof globalThis<"u"?globalThis:f||self,b(f.IduxChartsCore={},f.echarts,f.echarts,f.echarts,f.VueDemi,f.echarts,f._,f.echarts))})(this,function(f,b,I,et,h,A,M,rt){"use strict";function nt(e,t,r){let n;h.watch([e,t,r],([a,i,s],o,c)=>{!a||!i||(s?(n??(n=A.throttle(()=>i.resize(),16)),at(a,n)):z(a,n),c(()=>z(a,n)))})}const x=new Map;function at(e,t,r){if(!(!e||!t))if(x.has(e))x.get(e).listeners.push(t);else{const n=[t],a=new ResizeObserver(i=>{i.forEach(s=>n.forEach(o=>o(s)))});a.observe(e,r),x.set(e,{listeners:n,ro:a})}}function z(e,t){if(!e||!t||!x.has(e))return;const{listeners:r,ro:n}=x.get(e),a=r.indexOf(t);a>-1&&(r.splice(a,1),r.length===0&&(n.disconnect(),x.delete(e)))}A.use([rt.PictorialBarChart]);const L={text:"加载中..."};function P(e,t){const r=h.shallowRef(),n=h.shallowRef(),a=h.shallowRef(),i=h.computed(()=>h.unref(e).autoResize??!0),s=h.computed(()=>h.unref(e).group),o=h.computed(()=>h.unref(e).initOption),c=h.computed(()=>h.unref(e).loading),m=h.computed(()=>h.unref(e).setOptionOpts),k=h.computed(()=>h.unref(e).theme??"seer"),C=()=>{const p=r.value;if(!p)return;const d=A.init(p,k.value,o.value),S=h.unref(e),{restOptions:J,events:Ot}=N(S,t,!1);d.setOption(J,m.value),a.value=M.cloneDeep(J),Ot.forEach(([Q,tt,Et])=>{let B=tt;Et&&(B=(...Bt)=>{tt(...Bt),d.off(Q,B)}),d.on(Q,B)});const K=S.onReady||(t==null?void 0:t.ready);K&&K(d),n.value=d},Y=()=>{n.value&&(n.value.dispose(),n.value=void 0)};return h.onMounted(()=>C()),h.onBeforeUnmount(()=>Y()),h.watch(()=>h.unref(e),p=>{const d=n.value;if(!d)return;const{restOptions:S}=N(p);M.isEqual(S,a.value)||(d.setOption(S,m.value),a.value=M.cloneDeep(S))},{deep:!0}),h.watch([k,o],()=>{Y(),C()}),h.watchEffect(()=>{const p=s.value;p&&n.value&&(n.value.group=p)}),h.watchEffect(()=>{const p=n.value;if(!p)return;const d=c.value;d?p.showLoading(M.isBoolean(d)?L:{...L,...d}):p.hideLoading()}),nt(r,n,i),{containerRef:r,chartRef:n}}function it(e){return/^on[^a-z]/.test(e)}const st=["class","style","autoResize","group","loading","setOptionOpts","theme","onReady"];function N(e,t={},r=!0){const n={},a=[];return Object.keys(e).forEach(i=>{if(!st.includes(i)){if(it(i)){if(r)return;const s=e[i];if(s){const o=i.endsWith("Once"),c=o?i.length-4:void 0,m=i.charAt(2).toLowerCase()+i.substring(3,c);a.push([m,s,o])}return}n[i]=e[i]}}),h.isVue2&&!r&&Object.keys(t).forEach(i=>{if(i!=="ready")return;const s=t[i];if(s){const o=i.startsWith("~"),c=o?1:0,m=i.substring(c);a.push([m,s,o])}}),{restOptions:n,events:a}}function W(e,t){return`
2
+ <div class="charts-tooltips">
3
+ <div class="charts-tooltips-title">${e}</div>
4
+ ${t.map(r=>`
5
+ <div class="charts-tooltips-item">
6
+ <span class="charts-tooltips-item-border" style="background: ${r.color}"></span>
7
+ <span class="charts-tooltips-item-name">${r.name}</span>
8
+ <span class="charts-tooltips-item-value">${r.value}</span>
9
+ </div>`).join("")}
10
+ </div>`}function j({data:e=[],color:t="",offset:r=[0,0],rotate:n=-20,size:a=[2,8]}){return{name:"",data:e,type:"pictorialBar",symbolRotate:n,silent:!0,itemStyle:{color:t,opacity:0},emphasis:{itemStyle:{opacity:1}},symbolRepeat:"fixed",symbolMargin:2,symbol:"rect",symbolClip:!0,symbolSize:a,symbolPosition:"start",symbolOffset:r,z:1,animationEasing:"elasticOut"}}function ot(e){return{axisPointer:{lineStyle:{opacity:.6}},formatter:function(t){if(!(t!=null&&t.length))return"";const r=t[0].name,n=t.filter(a=>!!a.seriesName).map(a=>({name:a.seriesName,value:`${a.value} ${e}`,color:a.color}));return W(r,n)}}}function ft({series:e,color:t,offset:r=[0,0],rotate:n,size:a}){return[{type:"bar",z:0,...e},j({data:e.data,offset:r,color:t,rotate:n,size:a})]}function ht(){return{aria:{enabled:!0,decal:{show:!0,decals:[{color:"white",dashArrayX:[1,0],dashArrayY:[6,0],symbolSize:.5,rotation:Math.PI/2}]}}}}const q=h.defineComponent({name:"IxChart",inheritAttrs:!1,setup(e,{attrs:t,listeners:r}){const{containerRef:n}=P(t,r);return{containerRef:n}},render(){const{class:e,style:t}=this.$attrs;return h.h("div",{ref:"containerRef",class:e,style:{width:"100%",height:"100%",...t}})}});function u(e,t){ct(e)&&(e="100%");var r=ut(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function w(e){return Math.min(1,Math.max(0,e))}function ct(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function ut(e){return typeof e=="string"&&e.indexOf("%")!==-1}function G(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function R(e){return e<=1?"".concat(Number(e)*100,"%"):e}function F(e){return e.length===1?"0"+e:String(e)}function lt(e,t,r){return{r:u(e,255)*255,g:u(t,255)*255,b:u(r,255)*255}}function $(e,t,r){e=u(e,255),t=u(t,255),r=u(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),i=0,s=0,o=(n+a)/2;if(n===a)s=0,i=0;else{var c=n-a;switch(s=o>.5?c/(2-n-a):c/(n+a),n){case e:i=(t-r)/c+(t<r?6:0);break;case t:i=(r-e)/c+2;break;case r:i=(e-t)/c+4;break}i/=6}return{h:i,s,l:o}}function H(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function dt(e,t,r){var n,a,i;if(e=u(e,360),t=u(t,100),r=u(r,100),t===0)a=r,i=r,n=r;else{var s=r<.5?r*(1+t):r+t-r*t,o=2*r-s;n=H(o,s,e+1/3),a=H(o,s,e),i=H(o,s,e-1/3)}return{r:n*255,g:a*255,b:i*255}}function V(e,t,r){e=u(e,255),t=u(t,255),r=u(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),i=0,s=n,o=n-a,c=n===0?0:o/n;if(n===a)i=0;else{switch(n){case e:i=(t-r)/o+(t<r?6:0);break;case t:i=(r-e)/o+2;break;case r:i=(e-t)/o+4;break}i/=6}return{h:i,s:c,v:s}}function gt(e,t,r){e=u(e,360)*6,t=u(t,100),r=u(r,100);var n=Math.floor(e),a=e-n,i=r*(1-t),s=r*(1-a*t),o=r*(1-(1-a)*t),c=n%6,m=[r,s,i,i,o,r][c],k=[o,r,r,s,i,i][c],C=[i,i,o,r,r,s][c];return{r:m*255,g:k*255,b:C*255}}function U(e,t,r,n){var a=[F(Math.round(e).toString(16)),F(Math.round(t).toString(16)),F(Math.round(r).toString(16))];return n&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0):a.join("")}function pt(e,t,r,n,a){var i=[F(Math.round(e).toString(16)),F(Math.round(t).toString(16)),F(Math.round(r).toString(16)),F(bt(n))];return a&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))&&i[3].startsWith(i[3].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0)+i[3].charAt(0):i.join("")}function bt(e){return Math.round(parseFloat(e)*255).toString(16)}function _(e){return l(e)/255}function l(e){return parseInt(e,16)}function vt(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var T={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function yt(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,i=null,s=!1,o=!1;return typeof e=="string"&&(e=xt(e)),typeof e=="object"&&(v(e.r)&&v(e.g)&&v(e.b)?(t=lt(e.r,e.g,e.b),s=!0,o=String(e.r).substr(-1)==="%"?"prgb":"rgb"):v(e.h)&&v(e.s)&&v(e.v)?(n=R(e.s),a=R(e.v),t=gt(e.h,n,a),s=!0,o="hsv"):v(e.h)&&v(e.s)&&v(e.l)&&(n=R(e.s),i=R(e.l),t=dt(e.h,n,i),s=!0,o="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=G(r),{ok:s,format:e.format||o,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var mt="[-\\+]?\\d+%?",Ft="[-\\+]?\\d*\\.\\d+%?",y="(?:".concat(Ft,")|(?:").concat(mt,")"),O="[\\s|\\(]+(".concat(y,")[,|\\s]+(").concat(y,")[,|\\s]+(").concat(y,")\\s*\\)?"),E="[\\s|\\(]+(".concat(y,")[,|\\s]+(").concat(y,")[,|\\s]+(").concat(y,")[,|\\s]+(").concat(y,")\\s*\\)?"),g={CSS_UNIT:new RegExp(y),rgb:new RegExp("rgb"+O),rgba:new RegExp("rgba"+E),hsl:new RegExp("hsl"+O),hsla:new RegExp("hsla"+E),hsv:new RegExp("hsv"+O),hsva:new RegExp("hsva"+E),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function xt(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(T[e])e=T[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=g.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=g.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=g.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=g.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=g.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=g.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=g.hex8.exec(e),r?{r:l(r[1]),g:l(r[2]),b:l(r[3]),a:_(r[4]),format:t?"name":"hex8"}:(r=g.hex6.exec(e),r?{r:l(r[1]),g:l(r[2]),b:l(r[3]),format:t?"name":"hex"}:(r=g.hex4.exec(e),r?{r:l(r[1]+r[1]),g:l(r[2]+r[2]),b:l(r[3]+r[3]),a:_(r[4]+r[4]),format:t?"name":"hex8"}:(r=g.hex3.exec(e),r?{r:l(r[1]+r[1]),g:l(r[2]+r[2]),b:l(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function v(e){return Boolean(g.CSS_UNIT.exec(String(e)))}var St=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=vt(t)),this.originalInput=t;var a=yt(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:a.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,a,i=t.r/255,s=t.g/255,o=t.b/255;return i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),s<=.03928?n=s/12.92:n=Math.pow((s+.055)/1.055,2.4),o<=.03928?a=o/12.92:a=Math.pow((o+.055)/1.055,2.4),.2126*r+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=G(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=V(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=V(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=$(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=$(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),U(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),pt(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round(u(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round(u(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+U(this.r,this.g,this.b,!1),r=0,n=Object.entries(T);r<n.length;r++){var a=n[r],i=a[0],s=a[1];if(t===s)return i}return!1},e.prototype.toString=function(t){var r=Boolean(t);t=t??this.format;var n=!1,a=this.a<1&&this.a>=0,i=!r&&a&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=w(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=w(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=w(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=w(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),a=new e(t).toRgb(),i=r/100,s={r:(a.r-n.r)*i+n.r,g:(a.g-n.g)*i+n.g,b:(a.b-n.b)*i+n.b,a:(a.a-n.a)*i+n.a};return new e(s)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),a=360/r,i=[this];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,i.push(new e(n));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,a=r.s,i=r.v,s=[],o=1/t;t--;)s.push(new e({h:n,s:a,v:i})),i=(i+o)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),a=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/a,g:(r.g*r.a+n.g*n.a*(1-r.a))/a,b:(r.b*r.a+n.b*n.a*(1-r.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,a=[this],i=360/t,s=1;s<t;s++)a.push(new e({h:(n+s*i)%360,s:r.s,l:r.l}));return a},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();const D=["#458FFF","#45D9A3","#FFC145","#F5654F","#6A6AFD","#6ED1FF","#008787","#FF9245","#F587B3","#8352CC","#65779B"],At=["#458FFF","#C8DEFF","#45D9A3","#C8F4E4","#FFC145","#FFEDC8","#F5654F","#FCD1CB","#6A6AFD","#D3D3FE","#6ED1FF","#D3D3FE","#008787","#B3DBDB","#FF9245","#FFDFC8","#F587B3","#FCDBE8","#8352CC","#FCDBE8","#65779B","#65779B"],Mt=["#8C1604","#DB4C35","#FF9245","#FFC145","#689FFF","#45D9A3","#99ACD1"],Z={color:D,textStyle:{color:"#2F3540",fontSize:"12px"},bar:{barGap:.2,barWidth:10,label:{color:"#6F7785",position:"top"}},line:{label:{color:"#6F7785",position:"top"}},pie:{avoidLabelOverlap:!1,radius:["70%","80%"],itemStyle:{borderWidth:1,borderColor:"#fff"},label:{show:!1,color:"#2F3540",formatter:"{c}",position:"inside"}},legend:{itemWidth:12,itemHeight:12,textStyle:{color:"#6F7785",fontSize:"12px"}},title:{itemGap:4,textStyle:{color:"#2F3540",fontSize:"12px",fontWeight:500},subtextStyle:{color:"#6F7785",fontSize:"12px"}},tooltip:{borderWidth:0,padding:12,textStyle:{color:"#2F3540"},axisPointer:{z:1,lineStyle:{type:"solid",color:"#E1E5EB"}}},categoryAxis:{axisLine:{show:!0,lineStyle:{color:"#EDF1F7"}},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:"#EDF1F7"}},axisLabel:{color:"#6F7785"},splitLine:{show:!1},splitArea:{show:!1}},valueAxis:{axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6F7785"},splitLine:{lineStyle:{color:"#EDF1F7"}},splitArea:{show:!1},nameTextStyle:{color:"#6F7785",padding:[0,30,-4,0]}},dataZoom:{height:16}};function wt(e){return!!(e&&e.xAxis&&e.xAxis.data)}function Rt(e,t){return h.isVue2?{attrs:{...e},on:{...t}}:{...e}}function kt(e){return Object.entries(e).reduce((t,[r,n])=>(n!==void 0&&(t[r]=n),t),{})}function Ct(e){return M.isNil(e)?[]:Array.isArray(e)?e:[e]}const Ht=(e,t)=>new St(e).setAlpha(t).toRgbString();function X(e,t){A.use(t),A.registerTheme("seer",Z);const r=n=>{n.component(e.name,e)};e.install=r}X(q,[b.DataZoomComponent,b.LegendComponent,b.GridComponent,b.TitleComponent,b.TooltipComponent,I.LabelLayout,I.UniversalTransition,et.SVGRenderer]);const Tt=q;f.IxChart=Tt,f.convertArray=Ct,f.createInstall=X,f.filterEmptyProps=kt,f.getAlphaColor=Ht,f.isVertical=wt,f.mergeAttrs=Rt,f.seerColors=D,f.seerColorsForMore=At,f.seerColorsForRisk=Mt,f.seerTheme=Z,f.useChart=P,f.useStripe=j,f.useStripeArea=ht,f.useStripeBarSeries=ft,f.useStripeBarTooltip=ot,f.useTooltipsFormatter=W,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
@@ -7,4 +7,5 @@ export declare function mergeAttrs(props: any, listeners?: Record<string, Functi
7
7
  export declare function filterEmptyProps<T extends object>(props: T): T;
8
8
  export declare function convertArray<T>(value: T | undefined | null | Array<T | undefined | null>): T[];
9
9
  export declare function convertArray<T>(value: T | readonly T[]): readonly T[];
10
+ export declare const getAlphaColor: (baseColor: string, alpha: number) => string;
10
11
  export declare function createInstall(Chart: any, ext: Parameters<typeof use>[0]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idux/charts-core",
3
- "version": "0.4.1",
3
+ "version": "0.6.0",
4
4
  "description": "A UI Component Development Kit for Vue 3.x",
5
5
  "keywords": [
6
6
  "vue",
@@ -32,22 +32,23 @@
32
32
  "*.d.ts"
33
33
  ],
34
34
  "sideEffects": false,
35
+ "scripts": {
36
+ "clean": "rimraf dist node_modules",
37
+ "build": "rimraf dist && vite build"
38
+ },
35
39
  "dependencies": {
36
40
  "echarts": "^5.4.0",
37
41
  "lodash-es": "^4.17.0",
38
- "vue-demi": "^0.13.0"
42
+ "vue-demi": "^0.13.0",
43
+ "@ctrl/tinycolor": "^3.6.0"
39
44
  },
40
45
  "peerDependencies": {
41
46
  "@vue/composition-api": "^1.7.0",
42
- "vue": "^2.6.0 || ^3.2.0"
47
+ "vue": "^2.6.0 || ^3.2.5"
43
48
  },
44
49
  "peerDependenciesMeta": {
45
50
  "@vue/composition-api": {
46
51
  "optional": true
47
52
  }
48
- },
49
- "scripts": {
50
- "clean": "rimraf dist node_modules",
51
- "build": "rimraf dist && vite build"
52
53
  }
53
- }
54
+ }