super-page-runtime 2.3.7 → 2.3.8
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/dist/es/components/runtime/utils/charts/chart-columnline-util.js +76 -76
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +26 -24
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +59 -58
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +38 -37
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +28 -27
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +29 -22
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +7 -7
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +86 -82
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +18 -15
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +32 -29
- package/dist/es/style.css +30 -0
- package/package.json +2 -2
|
@@ -1,140 +1,140 @@
|
|
|
1
1
|
import { getValueFromSource as e, formatVariableValue as t, setValueForVariableName as i } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as s } from "../common-util.js";
|
|
3
|
-
import {
|
|
4
|
-
import { handleChartEvent as
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
let
|
|
10
|
-
const
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
for (const e2 of
|
|
3
|
+
import { setDefaultGrid as o, CommonName as a, caculateFormulaValue as l, sortDatas as n, limitDatas as r, executeChartFormula as u } from "./chart-util.js";
|
|
4
|
+
import { handleChartEvent as c } from "../events/event-util.js";
|
|
5
|
+
function d(d2, f, p, m) {
|
|
6
|
+
if (!m || !m.result) return;
|
|
7
|
+
o(p), c(d2, f, "beforeUpdateChart", p, { resultData: m });
|
|
8
|
+
const h = m && m.result ? m.result : {};
|
|
9
|
+
let y = m && m.groupValue ? m.groupValue : void 0;
|
|
10
|
+
const g = f.serviceDataField;
|
|
11
|
+
let v = null;
|
|
12
|
+
g ? v = h[g] : h && (v = Array.isArray(h) ? h : [h]), v || (v = []), f.runtime.dataConfig.runtimeData = v;
|
|
13
|
+
let F = f.props ? f.props.groups : null;
|
|
14
|
+
if (F || (F = []), !y || 0 === y.length) {
|
|
15
|
+
y = [];
|
|
16
|
+
for (const e2 of F) y.push(e2.group);
|
|
17
17
|
}
|
|
18
|
-
const
|
|
19
|
-
for (const e2 of
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
for (const t2 of
|
|
18
|
+
const S = {}, D = [], x = [];
|
|
19
|
+
for (const e2 of F) S[e2.group] = e2.target, e2.target && !D.includes(e2.target) && (D.push(e2.target), y.includes(e2.group) && x.push(e2.target));
|
|
20
|
+
let N = f.props ? f.props.mulGroupShow : "";
|
|
21
|
+
N = "break" == N ? "\r\n" : " ";
|
|
22
|
+
for (const t2 of v) {
|
|
23
23
|
if (!t2) continue;
|
|
24
24
|
const i2 = [];
|
|
25
|
-
for (const s3 of
|
|
26
|
-
const o2 =
|
|
25
|
+
for (const s3 of y) {
|
|
26
|
+
const o2 = S[s3], a2 = e(t2, o2, void 0);
|
|
27
27
|
a2 && i2.push(a2);
|
|
28
28
|
}
|
|
29
|
-
const s2 = i2.join(
|
|
30
|
-
t2[
|
|
29
|
+
const s2 = i2.join(N);
|
|
30
|
+
t2[a.X_FIELD_NAME] = s2;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
for (const e2 of
|
|
34
|
-
for (const e2 of
|
|
32
|
+
const E = f.items ? f.items : [], A = [], _ = {}, b = [], w = {}, C = [], I = [], X = /* @__PURE__ */ new Set(), L = l(E, v, X);
|
|
33
|
+
for (const e2 of X) C.push(e2);
|
|
34
|
+
for (const e2 of E) {
|
|
35
35
|
const t2 = e2.props ? e2.props : {}, i2 = t2.yaxisSource, s2 = t2.yaxisField, o2 = t2.isCumulative;
|
|
36
36
|
let a2 = null;
|
|
37
37
|
if (!s2 || i2 && "variable" != i2) if ("formula" == i2) {
|
|
38
38
|
let i3 = t2.formula ? t2.formula : "";
|
|
39
|
-
for (const e3 in
|
|
39
|
+
for (const e3 in L) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), L[e3]);
|
|
40
40
|
a2 = { uuid: e2.uuid, type: "formula", formula: i3, data: [], dynamicDatas: [] };
|
|
41
41
|
} else a2 = { uuid: e2.uuid, type: "fixed", field: t2.yaxisFix, data: [], dynamicDatas: [] };
|
|
42
|
-
else a2 = { uuid: e2.uuid, type: "variable", field: s2, isCumulative: o2, data: [], dynamicDatas: [] }, s2 && !
|
|
43
|
-
null != a2 && (
|
|
42
|
+
else a2 = { uuid: e2.uuid, type: "variable", field: s2, isCumulative: o2, data: [], dynamicDatas: [] }, s2 && !C.includes(s2) && (C.push(s2), I.push(s2)), o2 && !X.has(s2) && X.add(s2);
|
|
43
|
+
null != a2 && (A.push(a2), _[e2.uuid] = a2), t2.dynamicSeriesField && !b.includes(t2.dynamicSeriesField) && a2 && (a2.dynamicField = t2.dynamicSeriesField, a2.dynamicSeriesTitle = t2.dynamicSeriesTitle, a2.dynamicShowStack = t2.dynamicShowStack, b.push(t2.dynamicSeriesField), w[t2.dynamicSeriesField] = s2);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
45
|
+
const M = {};
|
|
46
|
+
if (b.length > 0) {
|
|
47
47
|
const t2 = [], i2 = {};
|
|
48
|
-
for (const s2 of
|
|
49
|
-
const l2 = s2[
|
|
48
|
+
for (const s2 of v) if (s2) for (const o2 of C) {
|
|
49
|
+
const l2 = s2[a.X_FIELD_NAME];
|
|
50
50
|
let n2 = i2[l2];
|
|
51
51
|
if (!n2) {
|
|
52
52
|
n2 = {};
|
|
53
|
-
for (const e2 of
|
|
54
|
-
n2[
|
|
53
|
+
for (const e2 of D) n2[e2] = s2[e2];
|
|
54
|
+
n2[a.X_FIELD_NAME] = s2[a.X_FIELD_NAME], i2[l2] = n2, t2.push(n2);
|
|
55
55
|
}
|
|
56
|
-
let r2 = e(s2,
|
|
56
|
+
let r2 = e(s2, o2, void 0);
|
|
57
57
|
if (!isNaN(r2)) {
|
|
58
|
-
const e2 = n2[
|
|
59
|
-
isNaN || (r2 += e2), n2[
|
|
58
|
+
const e2 = n2[o2];
|
|
59
|
+
isNaN || (r2 += e2), n2[o2] = r2;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
for (const t3 of
|
|
62
|
+
for (const t3 of b) {
|
|
63
63
|
const s2 = [];
|
|
64
|
-
for (const
|
|
65
|
-
if (!
|
|
66
|
-
const l2 = i2[
|
|
64
|
+
for (const o2 of v) {
|
|
65
|
+
if (!o2) continue;
|
|
66
|
+
const l2 = i2[o2[a.X_FIELD_NAME]];
|
|
67
67
|
if (!l2) continue;
|
|
68
|
-
let n2 = e(
|
|
69
|
-
n2 = null == n2 || null == n2 ? "" : n2, s2.includes(n2) || (s2.push(n2),
|
|
70
|
-
const r2 =
|
|
68
|
+
let n2 = e(o2, t3, void 0);
|
|
69
|
+
n2 = null == n2 || null == n2 ? "" : n2, s2.includes(n2) || (s2.push(n2), I.push(n2), X.add(n2));
|
|
70
|
+
const r2 = w[t3];
|
|
71
71
|
if (void 0 !== r2) {
|
|
72
|
-
const t4 = e(
|
|
72
|
+
const t4 = e(o2, r2, void 0);
|
|
73
73
|
let i3 = l2[n2];
|
|
74
74
|
void 0 === i3 ? i3 = t4 : isNaN(t4) || (i3 += t4), l2[n2] = i3;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
|
|
77
|
+
M[t3] = s2;
|
|
78
78
|
}
|
|
79
|
-
|
|
79
|
+
v = t2;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
for (const t2 of
|
|
84
|
-
for (const i2 of
|
|
81
|
+
n(d2, f, v), v = r(d2, f, v, D, I);
|
|
82
|
+
const j = [], k = {};
|
|
83
|
+
for (const t2 of v) if (t2) {
|
|
84
|
+
for (const i2 of X) {
|
|
85
85
|
const s2 = e(t2, i2, void 0);
|
|
86
|
-
let o2 =
|
|
87
|
-
void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2),
|
|
86
|
+
let o2 = k[i2];
|
|
87
|
+
void 0 === s2 || isNaN(s2) || (void 0 === o2 ? o2 = s2 : o2 += s2), k[i2] = o2;
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
for (const i2 of
|
|
89
|
+
j.push(t2[a.X_FIELD_NAME]);
|
|
90
|
+
for (const i2 of A) {
|
|
91
91
|
let s2 = i2.data;
|
|
92
92
|
const o2 = i2.dynamicDatas;
|
|
93
93
|
if (i2.dynamicField) {
|
|
94
|
-
let a2 =
|
|
94
|
+
let a2 = M[i2.dynamicField];
|
|
95
95
|
a2 = a2 || [];
|
|
96
96
|
for (let l2 = 0; l2 < a2.length; l2++) {
|
|
97
97
|
l2 >= o2.length && o2.push([]), s2 = o2[l2];
|
|
98
98
|
const n2 = a2[l2];
|
|
99
99
|
let r2 = e(t2, n2, void 0);
|
|
100
|
-
i2.isCumulative && (r2 =
|
|
100
|
+
i2.isCumulative && (r2 = k[n2]), s2.push(r2);
|
|
101
101
|
}
|
|
102
102
|
} else if ("fixed" === i2.type) s2.push(i2.field);
|
|
103
103
|
else if ("variable" === i2.type) {
|
|
104
104
|
let o3 = e(t2, i2.field, void 0);
|
|
105
|
-
i2.isCumulative && (o3 =
|
|
105
|
+
i2.isCumulative && (o3 = k[i2.field]), s2.push(o3);
|
|
106
106
|
} else if ("formula" === i2.type) {
|
|
107
|
-
const e2 =
|
|
107
|
+
const e2 = u(i2.formula, k, t2, d2);
|
|
108
108
|
s2.push(e2);
|
|
109
109
|
} else s2.push(void 0);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
for (const e2 of
|
|
114
|
-
const i2 =
|
|
112
|
+
const T = f.defaultSeries, V = s(null == T ? [] : T), $ = [];
|
|
113
|
+
for (const e2 of V) {
|
|
114
|
+
const i2 = _[e2.uuid];
|
|
115
115
|
if (i2.dynamicField) {
|
|
116
|
-
let o2 =
|
|
116
|
+
let o2 = M[i2.dynamicField];
|
|
117
117
|
o2 = o2 || [];
|
|
118
118
|
const a2 = i2.dynamicDatas ? i2.dynamicDatas : [];
|
|
119
119
|
for (let l2 = 0; l2 < o2.length; l2++) {
|
|
120
120
|
const n2 = o2[l2], r2 = s(e2);
|
|
121
121
|
if (i2.dynamicSeriesTitle) {
|
|
122
122
|
const e3 = i2.dynamicSeriesTitle.replace("${name}", n2);
|
|
123
|
-
r2.name = t(
|
|
123
|
+
r2.name = t(d2, e3);
|
|
124
124
|
} else r2.name = n2;
|
|
125
|
-
r2.data = l2 < a2.length ? a2[l2] : [], "bar" == e2.type && i2.dynamicShowStack && (r2.stack = e2.uuid),
|
|
125
|
+
r2.data = l2 < a2.length ? a2[l2] : [], "bar" == e2.type && i2.dynamicShowStack && (r2.stack = e2.uuid), $.push(r2);
|
|
126
126
|
}
|
|
127
|
-
} else e2.data = i2 ? i2.data : [],
|
|
127
|
+
} else e2.data = i2 ? i2.data : [], $.push(e2);
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
if (
|
|
132
|
-
if (
|
|
133
|
-
|
|
134
|
-
} else
|
|
135
|
-
const
|
|
136
|
-
!(
|
|
129
|
+
p.series = $;
|
|
130
|
+
const G = f.defaultXaxis, R = f.defaultYaxis;
|
|
131
|
+
if (p.isBar) {
|
|
132
|
+
if (R) for (const e2 of R) e2.data = j;
|
|
133
|
+
p.xAxis = G, p.yAxis = R;
|
|
134
|
+
} else G && G.length > 0 && (G[0].data = j), p.xAxis = G, p.yAxis = R;
|
|
135
|
+
const U = f.props ? f.props.selGroupVariable : null;
|
|
136
|
+
!(f.props ? f.props.enableDrill : null) && U && (f.highlightInfos = [], i(d2.entity, U, null)), c(d2, f, "afterUpdateChart", p, { resultData: m }), f.groupFields = x, f.cacheDatas = v, f.rawResult = m;
|
|
137
137
|
}
|
|
138
138
|
export {
|
|
139
|
-
|
|
139
|
+
d as updateChartOption
|
|
140
140
|
};
|
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
import { formatVariableValue as e, getValueFromSource as o } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as t } from "../common-util.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
n
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { setDefaultGrid as s } from "./chart-util.js";
|
|
4
|
+
function r(r2, l, i, p) {
|
|
5
|
+
if (!p || !p.result) return;
|
|
6
|
+
s(i);
|
|
7
|
+
const n = p && p.result ? p.result : {}, a = l.serviceDataField;
|
|
8
|
+
let u = null;
|
|
9
|
+
a ? u = n[a] : n && (u = [n]), u || (u = []);
|
|
10
|
+
const c = l.props ? l.props.nameSource : void 0, m = l.props ? l.props.nameField : void 0, d = l.props ? l.props.nameFixed : void 0, f = l.props ? l.props.yaxisField : void 0, h = [m], v = [], g = [];
|
|
11
|
+
for (const t2 of u) {
|
|
10
12
|
if (!t2) continue;
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
let s2 = null;
|
|
14
|
+
s2 = "fixed" == c ? e(r2, d) : o(t2, m, void 0), v.push(s2);
|
|
15
|
+
const l2 = o(t2, f, void 0);
|
|
16
|
+
g.push(l2);
|
|
15
17
|
}
|
|
16
|
-
const
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
let
|
|
20
|
-
|
|
18
|
+
const F = l.defaultSeries;
|
|
19
|
+
let x = F[0].pieColors;
|
|
20
|
+
x = x || [];
|
|
21
|
+
let j = F[0].pieColorMap;
|
|
22
|
+
j = j || {};
|
|
21
23
|
const S = [];
|
|
22
|
-
for (let e2 = 0; e2 <
|
|
23
|
-
const o2 = { value:
|
|
24
|
-
if (e2 <
|
|
25
|
-
let t2 =
|
|
26
|
-
t2 || (t2 =
|
|
24
|
+
for (let e2 = 0; e2 < v.length && e2 < g.length; e2++) {
|
|
25
|
+
const o2 = { value: g[e2], name: v[e2] };
|
|
26
|
+
if (e2 < x.length || j[o2.name]) {
|
|
27
|
+
let t2 = j[o2.name];
|
|
28
|
+
t2 || (t2 = x[e2]), t2 && (o2.itemStyle = { color: t2 });
|
|
27
29
|
}
|
|
28
30
|
S.push(o2);
|
|
29
31
|
}
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
+
const y = t(F);
|
|
33
|
+
y[0].data = S, i.series = [y[0]], l.groupFields = h, l.cacheDatas = u, l.rawResult = p;
|
|
32
34
|
}
|
|
33
35
|
export {
|
|
34
|
-
|
|
36
|
+
r as updateChartOption
|
|
35
37
|
};
|
|
@@ -1,80 +1,81 @@
|
|
|
1
1
|
import { getValueFromSource as o, setValueForVariableName as t } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as r } from "../common-util.js";
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
import { setDefaultGrid as s, CommonName as e, caculateFormulaValue as l, executeChartFormula as n, sortDatas as p, limitDatas as i } from "./chart-util.js";
|
|
4
|
+
function u(u2, c, a, f) {
|
|
5
|
+
if (!f || !f.result) return;
|
|
6
|
+
s(a);
|
|
7
|
+
const g = f && f.result ? f.result : {};
|
|
8
|
+
let m = f && f.groupValue ? f.groupValue : void 0;
|
|
9
|
+
const h = c.serviceDataField;
|
|
10
|
+
let d = null;
|
|
11
|
+
h ? d = g[h] : g && (d = Array.isArray(g) ? g : [g]), d || (d = []);
|
|
12
|
+
let y = c.props ? c.props.groups : null;
|
|
13
|
+
if (y || (y = []), !m || 0 === m.length) {
|
|
14
|
+
m = [];
|
|
15
|
+
for (const o2 of y) m.push(o2.group);
|
|
15
16
|
}
|
|
16
|
-
const
|
|
17
|
-
for (const o2 of
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
for (const t2 of
|
|
17
|
+
const x = {}, v = [], E = [];
|
|
18
|
+
for (const o2 of y) x[o2.group] = o2.target, o2.target && !v.includes(o2.target) && (v.push(o2.target), m.includes(o2.group) && E.push(o2.target));
|
|
19
|
+
let F = c.props ? c.props.mulGroupShow : "";
|
|
20
|
+
F = "break" == F ? "\r\n" : " ";
|
|
21
|
+
for (const t2 of d) {
|
|
21
22
|
if (!t2) continue;
|
|
22
23
|
const r2 = [];
|
|
23
|
-
for (const
|
|
24
|
-
const
|
|
24
|
+
for (const s3 of m) {
|
|
25
|
+
const e2 = x[s3], l2 = o(t2, e2, void 0);
|
|
25
26
|
l2 && r2.push(l2);
|
|
26
27
|
}
|
|
27
|
-
const
|
|
28
|
-
t2[
|
|
28
|
+
const s2 = r2.join(F);
|
|
29
|
+
t2[e.X_FIELD_NAME] = s2;
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
-
if (0 ==
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
if (
|
|
35
|
-
const t2 = [], r2 =
|
|
36
|
-
let
|
|
37
|
-
for (const o2 in r2)
|
|
38
|
-
|
|
31
|
+
const S = c.items ? c.items : [];
|
|
32
|
+
if (0 == S.length) return;
|
|
33
|
+
const _ = c.props ? c.props : {};
|
|
34
|
+
let A = _.yaxisField;
|
|
35
|
+
if (S[0].props.yaxisField = A, S[0].props.yaxisSource = _.yaxisSource, S[0].props.formula = _.formula, "formula" === _.yaxisSource) {
|
|
36
|
+
const t2 = [], r2 = l(S, d, t2);
|
|
37
|
+
let s2 = _.formula ? _.formula : "";
|
|
38
|
+
for (const o2 in r2) s2 = s2.replace(new RegExp(o2.replace("$", "\\$"), "g"), r2[o2]);
|
|
39
|
+
A = e.Y_TEMP_NAME;
|
|
39
40
|
const p2 = {};
|
|
40
|
-
for (const r3 of
|
|
41
|
+
for (const r3 of d) {
|
|
41
42
|
if (!r3) continue;
|
|
42
43
|
for (const s3 of t2) {
|
|
43
44
|
const t3 = o(r3, s3, void 0);
|
|
44
|
-
let
|
|
45
|
-
void 0 === t3 || isNaN(t3) || (void 0 ===
|
|
45
|
+
let e3 = p2[s3];
|
|
46
|
+
void 0 === t3 || isNaN(t3) || (void 0 === e3 ? e3 = t3 : e3 += t3), p2[s3] = e3;
|
|
46
47
|
}
|
|
47
|
-
const
|
|
48
|
-
r3[
|
|
48
|
+
const e2 = n(s2, p2, r3, u2);
|
|
49
|
+
r3[A] = e2;
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
for (const t2 of
|
|
52
|
+
S[0].props.yaxisField = A, S[0].props.yaxisSource = "", p(u2, c, d), d = i(u2, c, d, v, [A]);
|
|
53
|
+
const D = [], M = [];
|
|
54
|
+
for (const t2 of d) {
|
|
54
55
|
if (!t2) continue;
|
|
55
|
-
|
|
56
|
-
const r2 = o(t2,
|
|
57
|
-
|
|
56
|
+
D.push(t2[e.X_FIELD_NAME]);
|
|
57
|
+
const r2 = o(t2, A, void 0);
|
|
58
|
+
M.push(r2);
|
|
58
59
|
}
|
|
59
|
-
const
|
|
60
|
-
let
|
|
61
|
-
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
for (let o2 = 0; o2 <
|
|
66
|
-
const t2 = { value:
|
|
67
|
-
if (o2 <
|
|
68
|
-
let r2 =
|
|
69
|
-
r2 || (r2 =
|
|
60
|
+
const N = c.defaultSeries;
|
|
61
|
+
let j = N[0].pieColors;
|
|
62
|
+
j = j || [];
|
|
63
|
+
let b = N[0].pieColorMap;
|
|
64
|
+
b = b || {};
|
|
65
|
+
const w = [];
|
|
66
|
+
for (let o2 = 0; o2 < D.length && o2 < M.length; o2++) {
|
|
67
|
+
const t2 = { value: M[o2], name: D[o2] };
|
|
68
|
+
if (o2 < j.length || b[t2.name]) {
|
|
69
|
+
let r2 = b[t2.name];
|
|
70
|
+
r2 || (r2 = j[o2]), r2 && (t2.itemStyle = { color: r2 });
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
+
w.push(t2);
|
|
72
73
|
}
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
!(
|
|
74
|
+
const I = r(N);
|
|
75
|
+
I[0].data = w, a.series = [I[0]];
|
|
76
|
+
const V = c.props ? c.props.selGroupVariable : null;
|
|
77
|
+
!(c.props ? c.props.enableDrill : null) && V && (c.highlightInfos = [], t(u2.entity, V, null)), c.groupFields = E, c.cacheDatas = d, c.rawResult = f;
|
|
77
78
|
}
|
|
78
79
|
export {
|
|
79
|
-
|
|
80
|
+
u as updateChartOption
|
|
80
81
|
};
|
|
@@ -1,54 +1,55 @@
|
|
|
1
1
|
import { getValueFromSource as e } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as o } from "../common-util.js";
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
import { setDefaultGrid as i, caculateFormulaValue as t, executeChartFormula as a } from "./chart-util.js";
|
|
4
|
+
function s(s2, r, l, u) {
|
|
5
|
+
if (!u || !u.result) return;
|
|
6
|
+
i(l);
|
|
7
|
+
const f = u && u.result ? u.result : {}, d = r.serviceDataField;
|
|
8
|
+
let n = null;
|
|
9
|
+
d ? n = f[d] : f && (n = Array.isArray(f) ? f : [f]), n || (n = []);
|
|
10
|
+
const c = r.items ? r.items : [], p = [], m = {}, x = [], v = t(c, n, x);
|
|
11
|
+
for (const e2 of c) {
|
|
11
12
|
const o2 = e2.props ? e2.props : {}, i2 = o2.yaxisSource, t2 = o2.yaxisField;
|
|
12
|
-
let
|
|
13
|
+
let a2 = null;
|
|
13
14
|
if (!t2 || i2 && "variable" != i2) if ("formula" == i2) {
|
|
14
15
|
let i3 = o2.formula ? o2.formula : "";
|
|
15
|
-
for (const e3 in
|
|
16
|
-
|
|
17
|
-
} else
|
|
18
|
-
else
|
|
19
|
-
|
|
16
|
+
for (const e3 in v) i3 = i3.replace(new RegExp(e3.replace("$", "\\$"), "g"), v[e3]);
|
|
17
|
+
a2 = { uuid: e2.uuid, type: "formula", formula: i3, data: [] };
|
|
18
|
+
} else a2 = { uuid: e2.uuid, type: "fixed", field: o2.yaxisFix, data: [] };
|
|
19
|
+
else a2 = { uuid: e2.uuid, type: "variable", field: t2, data: [] };
|
|
20
|
+
a2 && (p.push(a2), m[a2.uuid] = a2);
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
-
for (const o2 of
|
|
22
|
+
const y = r.props ? r.props : {}, h = y.nameField, F = y.maxSource, b = y.maxField, g = y.maxFixed, j = [], S = {};
|
|
23
|
+
for (const o2 of n) {
|
|
23
24
|
if (!o2) continue;
|
|
24
|
-
const i2 = e(o2,
|
|
25
|
-
let
|
|
26
|
-
|
|
27
|
-
for (const i3 of
|
|
28
|
-
const
|
|
29
|
-
let
|
|
30
|
-
void 0 ===
|
|
25
|
+
const i2 = e(o2, h, void 0);
|
|
26
|
+
let t2 = null;
|
|
27
|
+
t2 = F && "variable" != F ? g : e(o2, b, void 0), j.push({ text: i2, max: t2 });
|
|
28
|
+
for (const i3 of x) {
|
|
29
|
+
const t3 = e(o2, i3, void 0);
|
|
30
|
+
let a2 = S[i3];
|
|
31
|
+
void 0 === t3 || isNaN(t3) || (void 0 === a2 ? a2 = t3 : a2 += t3), S[i3] = a2;
|
|
31
32
|
}
|
|
32
|
-
for (const i3 of
|
|
33
|
-
const
|
|
34
|
-
if ("fixed" == i3.type)
|
|
33
|
+
for (const i3 of p) {
|
|
34
|
+
const t3 = i3.data;
|
|
35
|
+
if ("fixed" == i3.type) t3.push(i3.field);
|
|
35
36
|
else if ("variable" == i3.type) {
|
|
36
|
-
const
|
|
37
|
-
|
|
37
|
+
const a2 = e(o2, i3.field, void 0);
|
|
38
|
+
t3.push(a2);
|
|
38
39
|
} else if ("formula" == i3.type) {
|
|
39
|
-
const e2 =
|
|
40
|
-
|
|
41
|
-
} else
|
|
40
|
+
const e2 = a(i3.formula, S, o2, s2);
|
|
41
|
+
t3.push(e2);
|
|
42
|
+
} else t3.push(void 0);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
-
const
|
|
46
|
-
for (const e2 of
|
|
47
|
-
const o2 =
|
|
45
|
+
l.radar[0].indicator = j;
|
|
46
|
+
const w = r.defaultSeries, A = o(w), D = A[0].data;
|
|
47
|
+
for (const e2 of D) {
|
|
48
|
+
const o2 = m[e2.uuid];
|
|
48
49
|
e2.value = o2.data;
|
|
49
50
|
}
|
|
50
|
-
|
|
51
|
+
l.series = A, r.cacheDatas = n, r.rawResult = u;
|
|
51
52
|
}
|
|
52
53
|
export {
|
|
53
|
-
|
|
54
|
+
s as updateChartOption
|
|
54
55
|
};
|
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
import { getValueFromSource as o } from "../page-helper-util.js";
|
|
2
2
|
import { deepCopy as s } from "../common-util.js";
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
5
|
-
if (!
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
import { setDefaultGrid as i, caculateFormulaValue as e, executeChartFormula as r } from "./chart-util.js";
|
|
4
|
+
function t(t2, a, l, u) {
|
|
5
|
+
if (!u || !u.result) return;
|
|
6
|
+
i(l);
|
|
7
|
+
const f = u && u.result ? u.result : {}, c = a.serviceDataField;
|
|
8
|
+
let d = null;
|
|
9
|
+
c ? d = f[c] : f && (d = Array.isArray(f) ? f : [f]), d || (d = []);
|
|
10
|
+
const n = a.items ? a.items : [], p = [], m = {};
|
|
11
|
+
for (const o2 of n) {
|
|
12
|
+
const s2 = o2.props ? o2.props : {}, i2 = o2.props ? o2.style : {}, e2 = s2.xaxisField, r2 = s2.sizeField, t3 = { uuid: o2.uuid, xaxisField: e2, yaxisField: s2.yaxisField, yaxisSource: s2.yaxisSource, formula: s2.formula, sizeField: r2, symbolSize: i2.symbolSize, data: [] };
|
|
13
|
+
p.push(t3), m[t3.uuid] = t3;
|
|
13
14
|
}
|
|
14
|
-
const
|
|
15
|
-
for (const o2 of
|
|
15
|
+
const x = [], y = e(n, d, x);
|
|
16
|
+
for (const o2 of p) if ("formula" === o2.yaxisSource) {
|
|
16
17
|
let s2 = o2.formula ? o2.formula : "";
|
|
17
|
-
for (const o3 in
|
|
18
|
+
for (const o3 in y) s2 = s2.replace(new RegExp(o3.replace("$", "\\$"), "g"), y[o3]);
|
|
18
19
|
o2.formula = s2;
|
|
19
20
|
}
|
|
20
|
-
const
|
|
21
|
-
for (const s2 of
|
|
22
|
-
for (const i2 of
|
|
21
|
+
const F = {};
|
|
22
|
+
for (const s2 of d) if (s2) {
|
|
23
|
+
for (const i2 of x) {
|
|
23
24
|
const e2 = o(s2, i2, void 0);
|
|
24
|
-
let
|
|
25
|
-
void 0 === e2 || isNaN(e2) || (void 0 ===
|
|
25
|
+
let r2 = F[i2];
|
|
26
|
+
void 0 === e2 || isNaN(e2) || (void 0 === r2 ? r2 = e2 : r2 += e2), F[i2] = r2;
|
|
26
27
|
}
|
|
27
|
-
for (const i2 of
|
|
28
|
-
const
|
|
28
|
+
for (const i2 of p) {
|
|
29
|
+
const e2 = i2.data, a2 = [];
|
|
29
30
|
if (a2.push(o(s2, i2.xaxisField, void 0)), "formula" === i2.yaxisSource) {
|
|
30
|
-
const o2 =
|
|
31
|
+
const o2 = r(i2.formula, F, s2, t2);
|
|
31
32
|
a2.push(o2);
|
|
32
33
|
} else a2.push(o(s2, i2.yaxisField, void 0));
|
|
33
|
-
i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize),
|
|
34
|
+
i2.sizeField ? a2.push(o(s2, i2.xaxisField, void 0)) : a2.push(i2.symbolSize), e2.push(a2);
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
const
|
|
37
|
-
for (const o2 of
|
|
38
|
-
const s2 =
|
|
37
|
+
const h = a.defaultSeries, S = s(h);
|
|
38
|
+
for (const o2 of S) {
|
|
39
|
+
const s2 = m[o2.uuid];
|
|
39
40
|
o2.data = s2.data;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
|
+
l.series = S, a.cacheDatas = d, a.rawResult = u;
|
|
42
43
|
}
|
|
43
44
|
export {
|
|
44
|
-
|
|
45
|
+
t as updateChartOption
|
|
45
46
|
};
|
|
@@ -110,3 +110,4 @@ export declare function exportCommonChart(chartRef: any): {
|
|
|
110
110
|
fileSize: string;
|
|
111
111
|
};
|
|
112
112
|
export declare function setHomeChartInitConfigValue(initConfig: any, tempContext: any, homeChartSettingUserId: any): void;
|
|
113
|
+
export declare function setDefaultGrid(chartOption: any): void;
|