@lingshugroup/web-plus 1.7.10 → 1.7.11
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/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/config/template/bar/index.cjs +1 -1
- package/lib/packages/ls-components/components/chart/config/template/bar/index.js +89 -65
- 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 +102 -85
- 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/lib/packages/ls-components/components/preview_pdf/composable/index.cjs +1 -1
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js +37 -35
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js.br +0 -0
- package/lib/packages/ls-components/components/preview_pdf/composable/index.js.gz +0 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/tooltip/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js +25 -25
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/tooltip/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/tree/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/tree/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/tree/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js +35 -31
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/tree/Index.vue/index2.js.gz +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.cjs +1 -1
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js +2 -2
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.br +0 -0
- package/lib/packages/ls-components/components/upload/Index.vue/index2.js.gz +0 -0
- package/lib/types/components/chart/types.d.ts +2 -0
- package/package.json +1 -1
package/lib/index.css.br
CHANGED
|
Binary file
|
package/lib/index.css.gz
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var C=Object.defineProperty;var
|
|
1
|
+
"use strict";var C=Object.defineProperty;var m=(a,t)=>C(a,"name",{value:t,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../../../_utils/utils/index.cjs"),r=require("../../base/index.cjs"),L=m((a,t,e,n,s,o,p)=>{const{name:O,seriesName:c,value:i,color:l}=a,u=n==0?`<div class="name">${O}</div>`:"",d=t&&i!=="-"&&c!=="temp"?`<span class="serise-name">${t?c:""}</span>`:"",b=i!=="-"&&c!=="temp"?`<span class="value">${o?o(i,p):i||i==0?i:"-"}</span>`:"",E=i!=="-"&&c!=="temp"?`<div class="content-badge ${e}" style="background-color: ${typeof l=="string"?l:s};"></div>`:"";return` ${u} <div class="content"> <div class="serise-wrap"> ${E} ${d} </div> ${b} </div> `},"setTooltipFormat"),T=m(a=>{let{legend:t,legendIcon:e,tooltip:n="shadow",theme:s="default",tooltipFormatter:o,barColorList:p,tooltipValueFormatter:O}=a;const c=p||r.BAR_COLOR_MAP[s||r.DEF_THEME][0];return o=o||function(i){let l=`<div class="ls-bar-tooltip-wrap ${s}">`;return i.forEach((u,d)=>{l+=L(u,!!t,e,d,c,O,u.dataIndex)}),l+"</div>"},n?{trigger:"axis",axisPointer:{type:n,z:1,label:{color:r.TOOLTIP_COLOR_MAP[s||r.DEF_THEME].color}},textStyle:{color:r.FONT_COLOR_MAP[s||r.DEF_THEME]},padding:12,backgroundColor:r.TOOLTIP_COLOR_MAP[s||r.DEF_THEME].bgColor,extraCssText:`box-shadow: ${r.TOOLTIP_COLOR_MAP[s||r.DEF_THEME].shadowColor};`,formatter:o}:null},"setTooltip"),x=m(a=>{const{legend:t,legendIcon:e="rect",theme:n}=a;return{type:"scroll",data:t||[],icon:e,itemWidth:12,itemHeight:10,textStyle:{color:r.FONT_COLOR_MAP[n||r.DEF_THEME],fontSize:12,height:10,rich:{a:{verticalAlign:"middle"}}}}},"setLegend"),v=m(a=>{const{dataZoom:t}=a,e={left:"3%",right:"3%",top:"12%",bottom:"3%",containLabel:!0};return t==="vertical"&&delete e.right,t==="horizontal"&&delete e.bottom,e},"setGrid"),f=m((a,t,e)=>{const{axisData:n,seriesData:s}=a,{axis:o="x",theme:p,dynamicAxis:O,type:c="simple"}=t,i={type:o==e?"category":"value",axisTick:{show:!1},axisLine:{show:o==e,lineStyle:{width:1,color:r.FONT_COLOR_MAP[p||r.DEF_THEME]}},axisLabel:{margin:18},splitLine:{lineStyle:{type:"dashed",color:r.SPLIT_LINE_COLOR[p||r.DEF_THEME]}}};if(o==e&&(i.data=n),o!==e&&O&&["simple","multiBar"].includes(c)){let l=[];c==="simple"?l=(s||[]).map(_=>g.numberFixed(_)):c==="multiBar"&&(l=(s||[]).reduce((_,y)=>_.concat(y.data),[]));const u=Math.max(...l),d=Math.min(...l),{aInterval:b,aMax:E,aMin:M}=g.formatChartAxis(u,d);i.min=M,i.max=E,i.interval=b}return[i]},"setAxis"),A=m(a=>{const{dataZoom:t,dataZoomColorOut:e,dataZoomColorIn:n,theme:s}=a;return t?[{show:!0,start:0,end:100,orient:t,showDataShadow:!0,dataBackground:{areaStyle:{color:n||"#d2dbee"}},fillerColor:e||"rgba(207, 223, 243, 0.25)",textStyle:{color:r.FONT_COLOR_MAP[s||r.DEF_THEME]}},{type:"inside",start:0,end:100,orient:t},{show:!1,yAxisIndex:0,filterMode:"empty",right:0,showDataShadow:!0}]:null},"setDataZoom"),h=m((a,t,e)=>{const n=a==="x"?"top":"left";let s="inside";const o=r.LABEL_POSITION_MAP[t]||{};return e?s=o[n]:s=o[`-${n}`],s},"getPos"),F=m((a,t,e)=>{const{type:n="simple",showBarFont:s=!0,labelPosition:o="inside",axis:p="x",showBackground:O,theme:c,seriesLabelFormatter:i}=a,l={type:"bar",name:t.name,label:{show:s,position:o,formatter:i||function(u){const d=u.value;return d!==0?d:""}},showBackground:O,backgroundStyle:{color:r.BG_BAR_COLOR_MAP[c||r.DEF_THEME]},data:t.data||[],barCategoryGap:"30%",barWidth:n==="multiBar"?"auto":"40%",barGap:"4%"};return["negative","categoryStack","waterfall"].includes(n)&&(l.stack="total",n==="negative"&&["both","insideBoth"].includes(o)?l.label.position=h(p,o,(t.data||[]).reduce((u,d)=>u+d)>0):n==="categoryStack"&&e>0&&(l.itemStyle={borderColor:r.BG_COLOR_MAP[c||r.DEF_THEME],borderWidth:2})),n==="waterfall"&&(l.itemStyle=e==0?{borderColor:"rgba(0,0,0,0)",color:"rgba(0,0,0,0)"}:null,l.emphasis=e==0?{itemStyle:{borderColor:"rgba(0,0,0,0)",color:"rgba(0,0,0,0)"}}:null,l.label=t.label||{show:e>0&&s,position:o,formatter:i||function(u){const d=u.value;return d!==0?d:""}},["both","insideBoth"].includes(o)&&(l.label.position=h(p,o,e===1))),l},"setSeriesOption"),S=m((a,t)=>{const{seriesData:e}=a,{type:n="simple",legend:s=[]}=t;return(n=="simple"?[{name:s[0],data:e}]:e||[]).map((o,p)=>F(t,o,p))},"setSeries"),w=m((a,t)=>{const{theme:e,barColorList:n}=t,s={textStyle:{},backgroundColor:r.BG_COLOR_MAP[e||r.DEF_THEME],color:n||r.BAR_COLOR_MAP[e||r.DEF_THEME],legend:x(t),grid:v(t),xAxis:f(a,t,"x"),yAxis:f(a,t,"y"),series:S(a,t),dataZoom:A(t)},o=T(t);return o&&(s.tooltip=o),s},"setOption");function D(a={},t={}){return w(a,t)}m(D,"dealOption");exports.dealOption=D;
|
|
@@ -1,36 +1,52 @@
|
|
|
1
1
|
var A = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var u = (r, t) => A(r, "name", { value: t, configurable: !0 });
|
|
3
3
|
import { numberFixed as _, formatChartAxis as B } from "../../../../_utils/utils/index.js";
|
|
4
|
-
import { BG_COLOR_MAP as
|
|
5
|
-
const
|
|
6
|
-
const { name:
|
|
7
|
-
return ` ${
|
|
8
|
-
}, "setTooltipFormat"), D = /* @__PURE__ */
|
|
9
|
-
let {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
import { BG_COLOR_MAP as O, DEF_THEME as d, BAR_COLOR_MAP as w, TOOLTIP_COLOR_MAP as x, FONT_COLOR_MAP as g, SPLIT_LINE_COLOR as M, BG_BAR_COLOR_MAP as $, LABEL_POSITION_MAP as I } from "../../base/index.js";
|
|
5
|
+
const k = /* @__PURE__ */ u((r, t, o, s, a, e, p) => {
|
|
6
|
+
const { name: b, seriesName: l, value: n, color: i } = r, m = s == 0 ? `<div class="name">${b}</div>` : "", c = t && n !== "-" && l !== "temp" ? `<span class="serise-name">${t ? l : ""}</span>` : "", f = n !== "-" && l !== "temp" ? `<span class="value">${e ? e(n, p) : n || n == 0 ? n : "-"}</span>` : "", h = n !== "-" && l !== "temp" ? `<div class="content-badge ${o}" style="background-color: ${typeof i == "string" ? i : a};"></div>` : "";
|
|
7
|
+
return ` ${m} <div class="content"> <div class="serise-wrap"> ${h} ${c} </div> ${f} </div> `;
|
|
8
|
+
}, "setTooltipFormat"), D = /* @__PURE__ */ u((r) => {
|
|
9
|
+
let {
|
|
10
|
+
legend: t,
|
|
11
|
+
legendIcon: o,
|
|
12
|
+
tooltip: s = "shadow",
|
|
13
|
+
theme: a = "default",
|
|
14
|
+
tooltipFormatter: e,
|
|
15
|
+
barColorList: p,
|
|
16
|
+
tooltipValueFormatter: b
|
|
17
|
+
} = r;
|
|
18
|
+
const l = p || w[a || d][0];
|
|
19
|
+
return e = e || function(n) {
|
|
20
|
+
let i = `<div class="ls-bar-tooltip-wrap ${a}">`;
|
|
21
|
+
return n.forEach((m, c) => {
|
|
22
|
+
i += k(
|
|
23
|
+
m,
|
|
24
|
+
!!t,
|
|
25
|
+
o,
|
|
26
|
+
c,
|
|
27
|
+
l,
|
|
28
|
+
b,
|
|
29
|
+
m.dataIndex
|
|
30
|
+
);
|
|
31
|
+
}), i + "</div>";
|
|
16
32
|
}, s ? {
|
|
17
33
|
trigger: "axis",
|
|
18
34
|
axisPointer: {
|
|
19
35
|
type: s,
|
|
20
36
|
z: 1,
|
|
21
37
|
label: {
|
|
22
|
-
color:
|
|
38
|
+
color: x[a || d].color
|
|
23
39
|
}
|
|
24
40
|
},
|
|
25
41
|
textStyle: {
|
|
26
|
-
color:
|
|
42
|
+
color: g[a || d]
|
|
27
43
|
},
|
|
28
44
|
padding: 12,
|
|
29
|
-
backgroundColor:
|
|
30
|
-
extraCssText: `box-shadow: ${
|
|
45
|
+
backgroundColor: x[a || d].bgColor,
|
|
46
|
+
extraCssText: `box-shadow: ${x[a || d].shadowColor};`,
|
|
31
47
|
formatter: e
|
|
32
48
|
} : null;
|
|
33
|
-
}, "setTooltip"), R = /* @__PURE__ */
|
|
49
|
+
}, "setTooltip"), R = /* @__PURE__ */ u((r) => {
|
|
34
50
|
const { legend: t, legendIcon: o = "rect", theme: s } = r;
|
|
35
51
|
return {
|
|
36
52
|
type: "scroll",
|
|
@@ -39,7 +55,7 @@ const I = /* @__PURE__ */ c((r, t, o, s, a) => {
|
|
|
39
55
|
itemWidth: 12,
|
|
40
56
|
itemHeight: 10,
|
|
41
57
|
textStyle: {
|
|
42
|
-
color:
|
|
58
|
+
color: g[s || d],
|
|
43
59
|
fontSize: 12,
|
|
44
60
|
height: 10,
|
|
45
61
|
rich: {
|
|
@@ -49,7 +65,7 @@ const I = /* @__PURE__ */ c((r, t, o, s, a) => {
|
|
|
49
65
|
}
|
|
50
66
|
}
|
|
51
67
|
};
|
|
52
|
-
}, "setLegend"),
|
|
68
|
+
}, "setLegend"), F = /* @__PURE__ */ u((r) => {
|
|
53
69
|
const { dataZoom: t } = r, o = {
|
|
54
70
|
left: "3%",
|
|
55
71
|
right: "3%",
|
|
@@ -58,8 +74,8 @@ const I = /* @__PURE__ */ c((r, t, o, s, a) => {
|
|
|
58
74
|
containLabel: !0
|
|
59
75
|
};
|
|
60
76
|
return t === "vertical" && delete o.right, t === "horizontal" && delete o.bottom, o;
|
|
61
|
-
}, "setGrid"),
|
|
62
|
-
const { axisData: s, seriesData: a } = r, { axis: e = "x", theme:
|
|
77
|
+
}, "setGrid"), v = /* @__PURE__ */ u((r, t, o) => {
|
|
78
|
+
const { axisData: s, seriesData: a } = r, { axis: e = "x", theme: p, dynamicAxis: b, type: l = "simple" } = t, n = {
|
|
63
79
|
type: e == o ? "category" : "value",
|
|
64
80
|
axisTick: {
|
|
65
81
|
show: !1
|
|
@@ -68,7 +84,7 @@ const I = /* @__PURE__ */ c((r, t, o, s, a) => {
|
|
|
68
84
|
show: e == o,
|
|
69
85
|
lineStyle: {
|
|
70
86
|
width: 1,
|
|
71
|
-
color:
|
|
87
|
+
color: g[p || d]
|
|
72
88
|
}
|
|
73
89
|
},
|
|
74
90
|
axisLabel: {
|
|
@@ -77,18 +93,18 @@ const I = /* @__PURE__ */ c((r, t, o, s, a) => {
|
|
|
77
93
|
splitLine: {
|
|
78
94
|
lineStyle: {
|
|
79
95
|
type: "dashed",
|
|
80
|
-
color: M[
|
|
96
|
+
color: M[p || d]
|
|
81
97
|
}
|
|
82
98
|
}
|
|
83
99
|
};
|
|
84
|
-
if (e == o && (n.data = s), e !== o &&
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
const
|
|
88
|
-
n.min = S, n.max =
|
|
100
|
+
if (e == o && (n.data = s), e !== o && b && ["simple", "multiBar"].includes(l)) {
|
|
101
|
+
let i = [];
|
|
102
|
+
l === "simple" ? i = (a || []).map((y) => _(y)) : l === "multiBar" && (i = (a || []).reduce((y, L) => y.concat(L.data), []));
|
|
103
|
+
const m = Math.max(...i), c = Math.min(...i), { aInterval: f, aMax: h, aMin: S } = B(m, c);
|
|
104
|
+
n.min = S, n.max = h, n.interval = f;
|
|
89
105
|
}
|
|
90
106
|
return [n];
|
|
91
|
-
}, "setAxis"),
|
|
107
|
+
}, "setAxis"), H = /* @__PURE__ */ u((r) => {
|
|
92
108
|
const { dataZoom: t, dataZoomColorOut: o, dataZoomColorIn: s, theme: a } = r;
|
|
93
109
|
return t ? [
|
|
94
110
|
{
|
|
@@ -111,7 +127,7 @@ const I = /* @__PURE__ */ c((r, t, o, s, a) => {
|
|
|
111
127
|
// },
|
|
112
128
|
// borderColor: null,
|
|
113
129
|
textStyle: {
|
|
114
|
-
color:
|
|
130
|
+
color: g[a || d]
|
|
115
131
|
}
|
|
116
132
|
},
|
|
117
133
|
{
|
|
@@ -128,76 +144,84 @@ const I = /* @__PURE__ */ c((r, t, o, s, a) => {
|
|
|
128
144
|
showDataShadow: !0
|
|
129
145
|
}
|
|
130
146
|
] : null;
|
|
131
|
-
}, "setDataZoom"),
|
|
147
|
+
}, "setDataZoom"), C = /* @__PURE__ */ u((r, t, o) => {
|
|
132
148
|
const s = r === "x" ? "top" : "left";
|
|
133
149
|
let a = "inside";
|
|
134
|
-
const e =
|
|
150
|
+
const e = I[t] || {};
|
|
135
151
|
return o ? a = e[s] : a = e[`-${s}`], a;
|
|
136
|
-
}, "getPos"),
|
|
137
|
-
const {
|
|
152
|
+
}, "getPos"), T = /* @__PURE__ */ u((r, t, o) => {
|
|
153
|
+
const {
|
|
154
|
+
type: s = "simple",
|
|
155
|
+
showBarFont: a = !0,
|
|
156
|
+
labelPosition: e = "inside",
|
|
157
|
+
axis: p = "x",
|
|
158
|
+
showBackground: b,
|
|
159
|
+
theme: l,
|
|
160
|
+
seriesLabelFormatter: n
|
|
161
|
+
} = r, i = {
|
|
138
162
|
type: "bar",
|
|
139
163
|
name: t.name,
|
|
140
164
|
label: {
|
|
141
165
|
show: a,
|
|
142
166
|
position: e,
|
|
143
|
-
formatter:
|
|
144
|
-
const
|
|
145
|
-
return
|
|
146
|
-
}
|
|
167
|
+
formatter: n || function(m) {
|
|
168
|
+
const c = m.value;
|
|
169
|
+
return c !== 0 ? c : "";
|
|
170
|
+
}
|
|
147
171
|
},
|
|
148
|
-
showBackground:
|
|
172
|
+
showBackground: b,
|
|
149
173
|
backgroundStyle: {
|
|
150
|
-
color: $[
|
|
174
|
+
color: $[l || d]
|
|
151
175
|
},
|
|
152
176
|
data: t.data || [],
|
|
153
177
|
barCategoryGap: "30%",
|
|
154
178
|
barWidth: s === "multiBar" ? "auto" : "40%",
|
|
155
179
|
barGap: "4%"
|
|
156
180
|
};
|
|
157
|
-
return ["negative", "categoryStack", "waterfall"].includes(s) && (
|
|
158
|
-
|
|
181
|
+
return ["negative", "categoryStack", "waterfall"].includes(s) && (i.stack = "total", s === "negative" && ["both", "insideBoth"].includes(e) ? i.label.position = C(
|
|
182
|
+
p,
|
|
159
183
|
e,
|
|
160
|
-
(t.data || []).reduce((
|
|
161
|
-
) : s === "categoryStack" && o > 0 && (
|
|
162
|
-
borderColor:
|
|
184
|
+
(t.data || []).reduce((m, c) => m + c) > 0
|
|
185
|
+
) : s === "categoryStack" && o > 0 && (i.itemStyle = {
|
|
186
|
+
borderColor: O[l || d],
|
|
163
187
|
borderWidth: 2
|
|
164
|
-
})), s === "waterfall" && (
|
|
188
|
+
})), s === "waterfall" && (i.itemStyle = o == 0 ? {
|
|
165
189
|
borderColor: "rgba(0,0,0,0)",
|
|
166
190
|
color: "rgba(0,0,0,0)"
|
|
167
|
-
} : null,
|
|
191
|
+
} : null, i.emphasis = o == 0 ? {
|
|
168
192
|
itemStyle: {
|
|
169
193
|
borderColor: "rgba(0,0,0,0)",
|
|
170
194
|
color: "rgba(0,0,0,0)"
|
|
171
195
|
}
|
|
172
|
-
} : null,
|
|
196
|
+
} : null, i.label = t.label || {
|
|
173
197
|
show: o > 0 && a,
|
|
174
198
|
position: e,
|
|
175
|
-
formatter:
|
|
176
|
-
const
|
|
177
|
-
return
|
|
178
|
-
}
|
|
179
|
-
}, ["both", "insideBoth"].includes(e) && (
|
|
180
|
-
}, "setSeriesOption"),
|
|
199
|
+
formatter: n || function(m) {
|
|
200
|
+
const c = m.value;
|
|
201
|
+
return c !== 0 ? c : "";
|
|
202
|
+
}
|
|
203
|
+
}, ["both", "insideBoth"].includes(e) && (i.label.position = C(p, e, o === 1))), i;
|
|
204
|
+
}, "setSeriesOption"), E = /* @__PURE__ */ u((r, t) => {
|
|
181
205
|
const { seriesData: o } = r, { type: s = "simple", legend: a = [] } = t;
|
|
182
|
-
return (s == "simple" ? [{ name: a[0], data: o }] : o || []).map((e,
|
|
183
|
-
}, "setSeries"), Z = /* @__PURE__ */
|
|
206
|
+
return (s == "simple" ? [{ name: a[0], data: o }] : o || []).map((e, p) => T(t, e, p));
|
|
207
|
+
}, "setSeries"), Z = /* @__PURE__ */ u((r, t) => {
|
|
184
208
|
const { theme: o, barColorList: s } = t, a = {
|
|
185
209
|
textStyle: {},
|
|
186
|
-
backgroundColor:
|
|
187
|
-
color: s ||
|
|
210
|
+
backgroundColor: O[o || d],
|
|
211
|
+
color: s || w[o || d],
|
|
188
212
|
legend: R(t),
|
|
189
|
-
grid:
|
|
190
|
-
xAxis:
|
|
191
|
-
yAxis:
|
|
192
|
-
series:
|
|
193
|
-
dataZoom:
|
|
213
|
+
grid: F(t),
|
|
214
|
+
xAxis: v(r, t, "x"),
|
|
215
|
+
yAxis: v(r, t, "y"),
|
|
216
|
+
series: E(r, t),
|
|
217
|
+
dataZoom: H(t)
|
|
194
218
|
}, e = D(t);
|
|
195
219
|
return e && (a.tooltip = e), a;
|
|
196
220
|
}, "setOption");
|
|
197
221
|
function z(r = {}, t = {}) {
|
|
198
222
|
return Z(r, t);
|
|
199
223
|
}
|
|
200
|
-
|
|
224
|
+
u(z, "dealOption");
|
|
201
225
|
export {
|
|
202
226
|
z as dealOption
|
|
203
227
|
};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var b=Object.defineProperty;var
|
|
1
|
+
"use strict";var b=Object.defineProperty;var p=(a,e)=>b(a,"name",{value:e,configurable:!0});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("../../../../_utils/utils/index.cjs"),t=require("../../base/index.cjs"),v=p((a,e,o,n,s,r,u)=>{const{name:c,seriesName:m,value:l,color:E}=a,i=n==0?`<div class="name">${c}</div>`:"",d=e&&l!=="-"&&m!=="temp"?`<span class="serise-name">${e?m:""}</span>`:"",O=l!=="-"&&m!=="temp"?`<span class="value">${r?r(l,u):l||l==0?l:"-"}</span>`:"",y=l!=="-"&&m!=="temp"?`<div class="content-badge ${o}" style="background-color: ${typeof E=="string"?E:s};"></div>`:"";return` ${i} <div class="content"> <div class="serise-wrap"> ${y} ${d} </div> ${O} </div> `},"setTooltipFormat"),C=p(a=>{let{legend:e,legendIcon:o,tooltip:n="shadow",theme:s,tooltipFormatter:r,barColorList:u,tooltipValueFormatter:c}=a;const m=u||t.BAR_COLOR_MAP[s||t.DEF_THEME][0];return r=r||function(l){let E=`<div class="ls-bar-tooltip-wrap ${s}">`;return l.forEach((i,d)=>{E+=v(i,!!e,o,d,m,c,i.dataIndex)}),E+"</div>"},n?{trigger:"axis",axisPointer:{type:n,z:1,label:{color:t.TOOLTIP_COLOR_MAP[s||t.DEF_THEME].color}},textStyle:{color:t.FONT_COLOR_MAP[s||t.DEF_THEME]},padding:12,backgroundColor:t.TOOLTIP_COLOR_MAP[s||t.DEF_THEME].bgColor,extraCssText:`box-shadow: ${t.TOOLTIP_COLOR_MAP[s||t.DEF_THEME].shadowColor};`,formatter:r}:null},"setTooltip"),A=p(a=>{const{legend:e,legendIcon:o="rect",theme:n}=a;return{type:"scroll",data:e||[],icon:o,itemWidth:12,itemHeight:10,textStyle:{color:t.FONT_COLOR_MAP[n||t.DEF_THEME],fontSize:12,height:10,rich:{a:{verticalAlign:"middle"}}}}},"setLegend"),F=p(a=>{const{dataZoom:e}=a,o={left:"3%",right:"3%",top:"12%",bottom:"3%",containLabel:!0};return e==="vertical"&&delete o.right,e==="horizontal"&&delete o.bottom,o},"setGrid"),T=p((a,e,o)=>{const{axisData:n,seriesData:s}=a,{axis:r="x",theme:u,lineBar:c,dynamicAxis:m,type:l}=e;let E=[{type:r==o?"category":"value",axisTick:{show:!1},axisLine:{show:r==o,lineStyle:{width:1,color:t.FONT_COLOR_MAP[u||t.DEF_THEME]}},axisLabel:{margin:18},splitLine:{lineStyle:{type:"dashed",color:t.SPLIT_LINE_COLOR[u||t.DEF_THEME]}},data:r==o?n:[]}];if(r!==o&&(c&&(E=r=="x"?[{type:"value",splitLine:{show:!1,lineStyle:{color:t.SPLIT_LINE_COLOR[u||t.DEF_THEME]}}},{type:"value",splitLine:{lineStyle:{color:t.SPLIT_LINE_COLOR[u||t.DEF_THEME],type:"dashed",width:2,dashOffset:2}}}]:[{type:"value"}]),m)){let i=[];l==="multiple"&&(!c||r=="y"&&c)&&(i=(s||[]).reduce((d,O)=>d.concat(O.data),[])),E.map((d,O)=>{var x;l==="multiple"?c&&r=="x"&&(i=(((x=(s||[])[O])==null?void 0:x.data)||[]).map(L=>g.numberFixed(L))):i=(s||[]).map(L=>g.numberFixed(L)),i=i.filter(L=>L>0);const y=Math.max(...i),_=Math.min(...i),{aInterval:f,aMax:h,aMin:M}=g.formatChartAxis(y,_);return d.min=M,d.max=h,d.interval=f,d})}return E},"setAxis"),S=p(a=>{const{dataZoom:e,dataZoomColorOut:o,dataZoomColorIn:n,theme:s}=a;return e?[{show:!0,start:0,end:100,orient:e,showDataShadow:!0,dataBackground:{areaStyle:{color:n||"#d2dbee"}},fillerColor:o||"rgba(207, 223, 243, 0.25)",textStyle:{color:t.FONT_COLOR_MAP[s||t.DEF_THEME]}},{type:"inside",start:0,end:100,orient:e},{show:!1,filterMode:"empty",right:0,showDataShadow:!0}]:null},"setDataZoom"),D=p((a,e)=>{const{seriesData:o}=a,{type:n="simple",showBarFont:s=!0,labelPosition:r="inside",smooth:u=!0,areaStyle:c=void 0,showBackground:m,theme:l,name:E,lineBar:i,axis:d,symbol:O="circle",seriesLabelFormatter:y}=e;return n==="multiple"?(o||[]).map((_,f)=>{const h={name:_.name,type:_.type,symbol:O,emphasis:_.emphasis||{focus:"series"},smooth:u,areaStyle:c||null,label:{show:s,position:r,formatter:y||function(M){const x=M.value;return x!==0?x:""}},showBackground:m,backgroundStyle:{color:t.BG_BAR_COLOR_MAP[l||t.DEF_THEME]},itemStyle:_.itemStyle||{},data:_.data||[]};return i&&(d!=="y"&&f===1?h.yAxisIndex=f:h.yAxisIndex&&delete h.yAxisIndex),h}):[{name:E,label:{show:s,position:r,formatter:y||function(_){const f=_.value;return f!==0?f:""}},showBackground:m,backgroundStyle:{color:t.BG_BAR_COLOR_MAP[l||t.DEF_THEME]},data:o||[],smooth:u,symbol:O,areaStyle:c||null,type:"line"}]},"setSeries"),H=p((a,e)=>{const{theme:o,barColorList:n}=e,s={textStyle:{},backgroundColor:t.BG_COLOR_MAP[o||t.DEF_THEME],color:n||t.BAR_COLOR_MAP[o||t.DEF_THEME],legend:A(e),grid:F(e),xAxis:T(a,e,"x"),yAxis:T(a,e,"y"),series:D(a,e),dataZoom:S(e)},r=C(e);return r&&(s.tooltip=r),s},"setOption");function w(a={},e={}){return H(a,e)}p(w,"dealOption");exports.dealOption=w;
|