@lingshugroup/web-plus 1.0.22 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -3
- package/lib/index.css +1 -1
- package/lib/index.css.br +0 -0
- package/lib/index.css.gz +0 -0
- package/lib/packages/ls-components/components/chart/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/chart/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js +21 -21
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/chart/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/chart/config/template/bar/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js +79 -73
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js.br +0 -0
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js.gz +0 -0
- package/lib/packages/ls-components/components/chart/config/template/line/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/template/line/index.js +84 -77
- package/lib/packages/ls-components/components/chart/config/template/line/index.js.br +0 -0
- package/lib/packages/ls-components/components/chart/config/template/line/index.js.gz +0 -0
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var
|
|
2
|
-
var p = (
|
|
3
|
-
import { numberFixed as
|
|
4
|
-
import { BG_COLOR_MAP as R, DEF_THEME as
|
|
5
|
-
const k = /* @__PURE__ */ p((
|
|
6
|
-
const { name:
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var p = (a, t) => I(a, "name", { value: t, configurable: !0 });
|
|
3
|
+
import { numberFixed as C, formatChartAxis as D } from "../../../../_utils/utils/index.js";
|
|
4
|
+
import { BG_COLOR_MAP as R, DEF_THEME as s, BAR_COLOR_MAP as M, TOOLTIP_COLOR_MAP as O, FONT_COLOR_MAP as b, DATA_ZOOM_COLOR as L, BG_BAR_COLOR_MAP as A, SPLIT_LINE_COLOR as S } from "../../base/index.js";
|
|
5
|
+
const k = /* @__PURE__ */ p((a, t, e, n, o) => {
|
|
6
|
+
const { name: r, seriesName: i, value: l, color: u } = a, d = n == 0 ? `<div class="name">${r}</div>` : "", y = t && l !== "-" && i !== "temp" ? `<span class="serise-name">${t ? i : ""}</span>` : "", c = l !== "-" && i !== "temp" ? `<span class="value">${l || "-"}</span>` : "", m = l !== "-" && i !== "temp" ? `<div class="content-badge ${e}" style="background-color: ${typeof u == "string" ? u : o};"></div>` : "";
|
|
7
7
|
return ` ${d} <div class="content"> <div class="serise-wrap"> ${m} ${y} </div> ${c} </div> `;
|
|
8
|
-
}, "setTooltipFormat"), H = /* @__PURE__ */ p((
|
|
9
|
-
let { legend: t, legendIcon: e, tooltip: n = "shadow", theme:
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
let d = `<div class="ls-bar-tooltip-wrap ${
|
|
8
|
+
}, "setTooltipFormat"), H = /* @__PURE__ */ p((a) => {
|
|
9
|
+
let { legend: t, legendIcon: e, tooltip: n = "shadow", theme: o, tooltipFormatter: r, barColorList: i } = a;
|
|
10
|
+
const l = i || M[o || s][0];
|
|
11
|
+
return r = r || function(u) {
|
|
12
|
+
let d = `<div class="ls-bar-tooltip-wrap ${o}">`;
|
|
13
13
|
return u.forEach((y, c) => {
|
|
14
|
-
d += k(y, t, e, c,
|
|
14
|
+
d += k(y, t, e, c, l);
|
|
15
15
|
}), d + "</div>";
|
|
16
16
|
}, n ? {
|
|
17
17
|
trigger: "axis",
|
|
@@ -19,19 +19,19 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
19
19
|
type: n,
|
|
20
20
|
z: 1,
|
|
21
21
|
label: {
|
|
22
|
-
color:
|
|
22
|
+
color: O[o || s].color
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
textStyle: {
|
|
26
|
-
color:
|
|
26
|
+
color: b[o || s]
|
|
27
27
|
},
|
|
28
28
|
padding: 12,
|
|
29
|
-
backgroundColor:
|
|
30
|
-
extraCssText: `box-shadow: ${
|
|
31
|
-
formatter:
|
|
29
|
+
backgroundColor: O[o || s].bgColor,
|
|
30
|
+
extraCssText: `box-shadow: ${O[o || s].shadowColor};`,
|
|
31
|
+
formatter: r
|
|
32
32
|
} : null;
|
|
33
|
-
}, "setTooltip"), T = /* @__PURE__ */ p((
|
|
34
|
-
const { legend: t, legendIcon: e = "rect", theme: n } =
|
|
33
|
+
}, "setTooltip"), T = /* @__PURE__ */ p((a) => {
|
|
34
|
+
const { legend: t, legendIcon: e = "rect", theme: n } = a;
|
|
35
35
|
return {
|
|
36
36
|
type: "scroll",
|
|
37
37
|
data: t || [],
|
|
@@ -39,7 +39,7 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
39
39
|
itemWidth: 12,
|
|
40
40
|
itemHeight: 10,
|
|
41
41
|
textStyle: {
|
|
42
|
-
color:
|
|
42
|
+
color: b[n || s],
|
|
43
43
|
fontSize: 12,
|
|
44
44
|
height: 10,
|
|
45
45
|
rich: {
|
|
@@ -49,8 +49,8 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
|
-
}, "setLegend"),
|
|
53
|
-
const { dataZoom: t } =
|
|
52
|
+
}, "setLegend"), Z = /* @__PURE__ */ p((a) => {
|
|
53
|
+
const { dataZoom: t } = a, e = {
|
|
54
54
|
left: "3%",
|
|
55
55
|
right: "3%",
|
|
56
56
|
top: "12%",
|
|
@@ -58,19 +58,19 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
58
58
|
containLabel: !0
|
|
59
59
|
};
|
|
60
60
|
return t === "vertical" && delete e.right, t === "horizontal" && delete e.bottom, e;
|
|
61
|
-
}, "setGrid"),
|
|
62
|
-
const { axisData: n, seriesData:
|
|
61
|
+
}, "setGrid"), _ = /* @__PURE__ */ p((a, t, e) => {
|
|
62
|
+
const { axisData: n, seriesData: o } = a, { axis: r = "x", theme: i, lineBar: l, dynamicAxis: u, type: d } = t;
|
|
63
63
|
let y = [
|
|
64
64
|
{
|
|
65
|
-
type:
|
|
65
|
+
type: r == e ? "category" : "value",
|
|
66
66
|
axisTick: {
|
|
67
67
|
show: !1
|
|
68
68
|
},
|
|
69
69
|
axisLine: {
|
|
70
|
-
show:
|
|
70
|
+
show: r == e,
|
|
71
71
|
lineStyle: {
|
|
72
72
|
width: 1,
|
|
73
|
-
color:
|
|
73
|
+
color: b[i || s]
|
|
74
74
|
}
|
|
75
75
|
},
|
|
76
76
|
axisLabel: {
|
|
@@ -79,19 +79,19 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
79
79
|
splitLine: {
|
|
80
80
|
lineStyle: {
|
|
81
81
|
type: "dashed",
|
|
82
|
-
color:
|
|
82
|
+
color: S[i || s]
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
-
data:
|
|
85
|
+
data: r == e ? n : []
|
|
86
86
|
}
|
|
87
87
|
];
|
|
88
|
-
if (
|
|
88
|
+
if (r !== e && (l && (y = r == "x" ? [
|
|
89
89
|
{
|
|
90
90
|
type: "value",
|
|
91
91
|
splitLine: {
|
|
92
92
|
show: !1,
|
|
93
93
|
lineStyle: {
|
|
94
|
-
color:
|
|
94
|
+
color: S[i || s]
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
},
|
|
@@ -99,7 +99,7 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
99
99
|
type: "value",
|
|
100
100
|
splitLine: {
|
|
101
101
|
lineStyle: {
|
|
102
|
-
color:
|
|
102
|
+
color: S[i || s],
|
|
103
103
|
type: "dashed",
|
|
104
104
|
width: 2,
|
|
105
105
|
dashOffset: 2
|
|
@@ -112,16 +112,16 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
112
112
|
}
|
|
113
113
|
]), u)) {
|
|
114
114
|
let c = [];
|
|
115
|
-
d === "multiple" && (!
|
|
116
|
-
var
|
|
117
|
-
d === "multiple" ?
|
|
118
|
-
const
|
|
119
|
-
return m.min = B, m.max = $, m.interval =
|
|
115
|
+
d === "multiple" && (!l || r == "y" && l) && (c = o.reduce((m, x) => m.concat(x.data), [])), y.map((m, x) => {
|
|
116
|
+
var w;
|
|
117
|
+
d === "multiple" ? l && r == "x" && (c = (((w = o[x]) == null ? void 0 : w.data) || []).map((v) => C(v))) : c = (o || []).map((v) => C(v));
|
|
118
|
+
const h = Math.max(...c), g = Math.min(...c), { aInterval: f, aMax: $, aMin: B } = D(h, g);
|
|
119
|
+
return m.min = B, m.max = $, m.interval = f, m;
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
return y;
|
|
123
|
-
}, "setAxis"),
|
|
124
|
-
const { dataZoom: t,
|
|
123
|
+
}, "setAxis"), F = /* @__PURE__ */ p((a) => {
|
|
124
|
+
const { dataZoom: t, dataZoomColorOut: e, dataZoomColorIn: n, theme: o } = a;
|
|
125
125
|
return t ? [
|
|
126
126
|
{
|
|
127
127
|
show: !0,
|
|
@@ -130,14 +130,20 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
130
130
|
orient: t,
|
|
131
131
|
showDataShadow: !0,
|
|
132
132
|
dataBackground: {
|
|
133
|
+
lineStyle: {
|
|
134
|
+
color: "transparent"
|
|
135
|
+
},
|
|
133
136
|
areaStyle: {
|
|
134
|
-
color: L[
|
|
137
|
+
color: n || L[o || s][0]
|
|
135
138
|
}
|
|
136
139
|
},
|
|
137
|
-
fillerColor: L[
|
|
140
|
+
fillerColor: e || L[o || s][1],
|
|
141
|
+
moveHandleStyle: {
|
|
142
|
+
opacity: 0
|
|
143
|
+
},
|
|
138
144
|
borderColor: null,
|
|
139
145
|
textStyle: {
|
|
140
|
-
color:
|
|
146
|
+
color: b[o || s]
|
|
141
147
|
}
|
|
142
148
|
},
|
|
143
149
|
{
|
|
@@ -153,76 +159,77 @@ const k = /* @__PURE__ */ p((o, t, e, n, s) => {
|
|
|
153
159
|
showDataShadow: !0
|
|
154
160
|
}
|
|
155
161
|
] : null;
|
|
156
|
-
}, "setDataZoom"),
|
|
157
|
-
const { seriesData: e } =
|
|
162
|
+
}, "setDataZoom"), E = /* @__PURE__ */ p((a, t) => {
|
|
163
|
+
const { seriesData: e } = a, {
|
|
158
164
|
type: n = "simple",
|
|
159
|
-
showBarFont:
|
|
160
|
-
labelPosition:
|
|
161
|
-
smooth:
|
|
162
|
-
areaStyle:
|
|
165
|
+
showBarFont: o = !0,
|
|
166
|
+
labelPosition: r = "inside",
|
|
167
|
+
smooth: i = !0,
|
|
168
|
+
areaStyle: l = void 0,
|
|
163
169
|
showBackground: u,
|
|
164
170
|
theme: d,
|
|
165
171
|
name: y,
|
|
166
172
|
lineBar: c,
|
|
167
|
-
axis: m
|
|
173
|
+
axis: m,
|
|
174
|
+
symbol: x = "circle"
|
|
168
175
|
} = t;
|
|
169
|
-
return n === "multiple" ? (e || []).map((h,
|
|
170
|
-
const
|
|
176
|
+
return n === "multiple" ? (e || []).map((h, g) => {
|
|
177
|
+
const f = {
|
|
171
178
|
name: h.name,
|
|
172
179
|
type: h.type,
|
|
180
|
+
symbol: x,
|
|
173
181
|
emphasis: h.emphasis || {
|
|
174
182
|
focus: "series"
|
|
175
183
|
},
|
|
176
|
-
smooth:
|
|
177
|
-
areaStyle:
|
|
178
|
-
opacity: 0.2
|
|
179
|
-
},
|
|
184
|
+
smooth: i,
|
|
185
|
+
areaStyle: l || null,
|
|
180
186
|
label: {
|
|
181
|
-
show:
|
|
182
|
-
position:
|
|
187
|
+
show: o,
|
|
188
|
+
position: r
|
|
183
189
|
},
|
|
184
190
|
showBackground: u,
|
|
185
191
|
backgroundStyle: {
|
|
186
|
-
color: A[d ||
|
|
192
|
+
color: A[d || s]
|
|
187
193
|
},
|
|
188
194
|
itemStyle: h.itemStyle || {},
|
|
189
195
|
data: h.data || []
|
|
190
196
|
};
|
|
191
|
-
return c && (m !== "y" &&
|
|
197
|
+
return c && (m !== "y" && g === 1 ? f.yAxisIndex = g : f.yAxisIndex && delete f.yAxisIndex), f;
|
|
192
198
|
}) : [
|
|
193
199
|
{
|
|
194
200
|
name: y,
|
|
195
201
|
label: {
|
|
196
|
-
show:
|
|
197
|
-
position:
|
|
202
|
+
show: o,
|
|
203
|
+
position: r
|
|
198
204
|
},
|
|
199
205
|
showBackground: u,
|
|
200
206
|
backgroundStyle: {
|
|
201
|
-
color: A[d ||
|
|
207
|
+
color: A[d || s]
|
|
202
208
|
},
|
|
203
209
|
data: e || [],
|
|
204
|
-
smooth:
|
|
210
|
+
smooth: i,
|
|
211
|
+
symbol: x,
|
|
205
212
|
// 设置填充透明度
|
|
206
|
-
areaStyle:
|
|
213
|
+
areaStyle: l || null,
|
|
207
214
|
type: "line"
|
|
208
215
|
}
|
|
209
216
|
];
|
|
210
|
-
}, "setSeries"), z = /* @__PURE__ */ p((
|
|
211
|
-
const { theme: e, barColorList: n } = t,
|
|
217
|
+
}, "setSeries"), z = /* @__PURE__ */ p((a, t) => {
|
|
218
|
+
const { theme: e, barColorList: n } = t, o = {
|
|
212
219
|
textStyle: {},
|
|
213
|
-
backgroundColor: R[e ||
|
|
214
|
-
color: n ||
|
|
220
|
+
backgroundColor: R[e || s],
|
|
221
|
+
color: n || M[e || s],
|
|
215
222
|
legend: T(t),
|
|
216
|
-
grid:
|
|
217
|
-
xAxis:
|
|
218
|
-
yAxis:
|
|
219
|
-
series:
|
|
220
|
-
dataZoom:
|
|
221
|
-
},
|
|
222
|
-
return
|
|
223
|
+
grid: Z(t),
|
|
224
|
+
xAxis: _(a, t, "x"),
|
|
225
|
+
yAxis: _(a, t, "y"),
|
|
226
|
+
series: E(a, t),
|
|
227
|
+
dataZoom: F(t)
|
|
228
|
+
}, r = H(t);
|
|
229
|
+
return r && (o.tooltip = r), o;
|
|
223
230
|
}, "setOption");
|
|
224
|
-
function W(
|
|
225
|
-
return z(
|
|
231
|
+
function W(a = {}, t = {}) {
|
|
232
|
+
return z(a, t);
|
|
226
233
|
}
|
|
227
234
|
p(W, "dealOption");
|
|
228
235
|
export {
|
|
Binary file
|
|
Binary file
|