@zgfe/business-lib 1.2.55-heyh.1 → 1.2.55-ljy.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/es/addToPanel/index.js +1 -0
- package/es/assets/iconfont/demo_index.html +3 -3
- package/es/assets/iconfont/iconfont.css +3 -3
- package/es/assets/iconfont/iconfont.ttf +0 -0
- package/es/assets/iconfont/iconfont.woff +0 -0
- package/es/assets/iconfont/iconfont.woff2 +0 -0
- package/es/chart/demo/data/data.d.ts +0 -2
- package/es/chart/demo/data/data.js +37 -5
- package/es/chart/demo/line_bar_stack.js +1 -0
- package/es/chart/index.js +0 -10
- package/es/chart/styles/index.less +0 -45
- package/es/chart/util/chartOptionConfig.js +0 -12
- package/es/chart/util/formatData.js +1 -3
- package/es/chart/util/formatOption.js +11 -21
- package/package.json +2 -2
package/es/addToPanel/index.js
CHANGED
|
@@ -216,6 +216,7 @@ var BizAddToPanel = function BizAddToPanel(props) {
|
|
|
216
216
|
options: props.styleOptions
|
|
217
217
|
}));
|
|
218
218
|
}
|
|
219
|
+
if (props.showOptions && props.showOptions.length == 0) return;
|
|
219
220
|
if (showTypes.indexOf(type) > -1) {
|
|
220
221
|
return /*#__PURE__*/React.createElement(Form.Item, {
|
|
221
222
|
label: "\u663E\u793A",
|
|
@@ -1398,9 +1398,9 @@
|
|
|
1398
1398
|
<pre><code class="language-css"
|
|
1399
1399
|
>@font-face {
|
|
1400
1400
|
font-family: 'bsicon';
|
|
1401
|
-
src: url('iconfont.woff2?t=
|
|
1402
|
-
url('iconfont.woff?t=
|
|
1403
|
-
url('iconfont.ttf?t=
|
|
1401
|
+
src: url('iconfont.woff2?t=1724237872032') format('woff2'),
|
|
1402
|
+
url('iconfont.woff?t=1724237872032') format('woff'),
|
|
1403
|
+
url('iconfont.ttf?t=1724237872032') format('truetype');
|
|
1404
1404
|
}
|
|
1405
1405
|
</code></pre>
|
|
1406
1406
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: "bsicon"; /* Project id 2545884 */
|
|
3
|
-
src: url('iconfont.woff2?t=
|
|
4
|
-
url('iconfont.woff?t=
|
|
5
|
-
url('iconfont.ttf?t=
|
|
3
|
+
src: url('iconfont.woff2?t=1724237872032') format('woff2'),
|
|
4
|
+
url('iconfont.woff?t=1724237872032') format('woff'),
|
|
5
|
+
url('iconfont.ttf?t=1724237872032') format('truetype');
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.bsicon {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,17 +1,49 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
xAxis: ['2022-12-01', '2022-12-02', '2022-12-03', '2022-12-04', '2022-12-05', '2022-12-06', '2022-12-07', '2022-12-08', '2022-12-09', '2022-12-10', '2022-12-11', '
|
|
2
|
+
xAxis: ['2022-12-01', '2022-12-02', '2022-12-03', '2022-12-04', '2022-12-05', '2022-12-06', '2022-12-07', '2022-12-08', '2022-12-09', '2022-12-10', '2022-12-11', '2023-12-12', '2023-12-13', '2023-12-14'],
|
|
3
3
|
series: [{
|
|
4
|
+
names: ['付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功'],
|
|
5
|
+
values: [26, 27, 43, 44, 40, 34, 33, 33, 34, 24, 30, 31, 31, 38],
|
|
6
|
+
orderNum: 1
|
|
7
|
+
}, {
|
|
8
|
+
names: ['注册-发送手机验证码'],
|
|
9
|
+
values: [11, 10, 7, 5, 13, 18, 14, 17, 11, 6, 10, 12, 15, 10],
|
|
10
|
+
orderNum: 1
|
|
11
|
+
}, {
|
|
12
|
+
names: ['搜索商品'],
|
|
13
|
+
values: [75, 68, 86, 80, 87, 71, 72, 81, 77, 74, 78, 76, 76, 79],
|
|
14
|
+
orderNum: 2
|
|
15
|
+
}, {
|
|
4
16
|
names: ['pv'],
|
|
5
17
|
values: [104, 89, 109, 103, 112, 93, 87, 101, 101, 97, 102, 110, 106, 98],
|
|
6
|
-
minValues: [null, null, null, null, null, null, null, null, null, null, null, 102, 0, 1, 2],
|
|
7
|
-
maxValues: [null, null, null, null, null, null, null, null, null, null, null, 666, 1111, 2222],
|
|
8
18
|
orderNum: 3
|
|
9
19
|
}, {
|
|
10
20
|
names: ['申请退货2'],
|
|
11
21
|
values: [5, 11, 14, 9, 8, 14, 9, 10, 12, 12, 14, 16, 12, 10],
|
|
12
|
-
minValues: [null, null, null, null, null, null, null, null, null, null, null, null, 44, 55, 66],
|
|
13
|
-
maxValues: [null, null, null, null, null, null, null, null, null, null, null, null, 888, 5555],
|
|
14
22
|
orderNum: 4
|
|
23
|
+
}, {
|
|
24
|
+
names: ['搜索商品'],
|
|
25
|
+
values: [75, 68, 86, 80, 87, 71, 72, 81, 77, 74, 78, 76, 76, 79],
|
|
26
|
+
orderNum: 5
|
|
27
|
+
}, {
|
|
28
|
+
names: ['付款成功11付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功付款成功'],
|
|
29
|
+
values: [26, 27, 43, 44, 40, 34, 33, 33, 34, 24, 30, 31, 31, 38],
|
|
30
|
+
orderNum: 1
|
|
31
|
+
}, {
|
|
32
|
+
names: ['查看商品详情'],
|
|
33
|
+
values: [122, 107, 132, 113, 133, 115, 106, 127, 132, 117, 119, 123, 119, 117],
|
|
34
|
+
orderNum: 2
|
|
35
|
+
}, {
|
|
36
|
+
names: ['scroll'],
|
|
37
|
+
values: [98, 96, 106, 109, 113, 105, 91, 111, 99, 99, 104, 108, 116, 92],
|
|
38
|
+
orderNum: 3
|
|
39
|
+
}, {
|
|
40
|
+
names: ['click'],
|
|
41
|
+
values: [108, 102, 111, 90, 111, 105, 91, 129, 117, 101, 109, 109, 105, 96],
|
|
42
|
+
orderNum: 4
|
|
43
|
+
}, {
|
|
44
|
+
names: ['申请退货'],
|
|
45
|
+
values: [5, 11, 14, 9, 8, 14, 9, 10, 12, 12, 14, 16, 12, 10],
|
|
46
|
+
orderNum: 5
|
|
15
47
|
}]
|
|
16
48
|
};
|
|
17
49
|
export var barData = {
|
|
@@ -146,6 +146,7 @@ export default (function () {
|
|
|
146
146
|
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"biz-tooltip-order\" style=\"background:".concat(params.color, "\"></span>\n <div class=\"biz-tooltip-name\">").concat(params.seriesName, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(params.value, "</span>\n </div>"));
|
|
147
147
|
return htmlArray.join('');
|
|
148
148
|
};
|
|
149
|
+
console.log('colorList', colorList);
|
|
149
150
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizChart, {
|
|
150
151
|
showList: showList,
|
|
151
152
|
data: data,
|
package/es/chart/index.js
CHANGED
|
@@ -71,16 +71,6 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
71
71
|
option.series.forEach(function (series, seriesIndex) {
|
|
72
72
|
var dashedItem = addDashedSeries(series, index - 1);
|
|
73
73
|
dashedItem.itemStyle.normal.color = dashedItem.lineStyle.normal.color = option.color[seriesIndex];
|
|
74
|
-
dashedItem.markArea = {
|
|
75
|
-
itemStyle: {
|
|
76
|
-
color: 'rgba(22, 93, 255, 0.08)'
|
|
77
|
-
},
|
|
78
|
-
data: [[{
|
|
79
|
-
xAxis: option.xAxis.data[index]
|
|
80
|
-
}, {
|
|
81
|
-
xAxis: option.xAxis.data[option.xAxis.data.length - 1]
|
|
82
|
-
}]]
|
|
83
|
-
};
|
|
84
74
|
dashedSeries.push(dashedItem);
|
|
85
75
|
});
|
|
86
76
|
option.series = option.series.concat(dashedSeries);
|
|
@@ -65,49 +65,4 @@
|
|
|
65
65
|
font-weight: 500;
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
.biz-chart-tooltip-item-new {
|
|
70
|
-
min-height: @height-sm;
|
|
71
|
-
margin-bottom: 4px;
|
|
72
|
-
padding: 0px @padding-xs;
|
|
73
|
-
font-size: @font-size-sm;
|
|
74
|
-
background: @white;
|
|
75
|
-
border-radius: @border-radius-small;
|
|
76
|
-
box-shadow: @box-shadow-small;
|
|
77
|
-
.biz-chart-tooltip-content {
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
color: @text-color-secondary;
|
|
81
|
-
|
|
82
|
-
.biz-tooltip-marker {
|
|
83
|
-
width: 8px;
|
|
84
|
-
height: 8px;
|
|
85
|
-
margin-right: @margin-xs;
|
|
86
|
-
border-radius: 50%;
|
|
87
|
-
}
|
|
88
|
-
.biz-tooltip-order {
|
|
89
|
-
display: flex;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-content: center;
|
|
92
|
-
width: 12.8px;
|
|
93
|
-
height: 12.8px;
|
|
94
|
-
margin-right: @margin-xs;
|
|
95
|
-
color: #fff;
|
|
96
|
-
font-weight: 500;
|
|
97
|
-
font-size: 8.96px;
|
|
98
|
-
background: #457dff;
|
|
99
|
-
border-radius: 50%;
|
|
100
|
-
}
|
|
101
|
-
.biz-tooltip-name {
|
|
102
|
-
max-width: 300px;
|
|
103
|
-
white-space: pre-wrap;
|
|
104
|
-
word-wrap: break-word;
|
|
105
|
-
word-break: break-all;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
&-value {
|
|
109
|
-
font-weight: 700;
|
|
110
|
-
// font-size: 14px;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
68
|
}
|
|
@@ -161,7 +161,6 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
161
161
|
yAxis.minInterval = 1;
|
|
162
162
|
}
|
|
163
163
|
var series = [];
|
|
164
|
-
var seriesObject = {};
|
|
165
164
|
if (chartType === 'bar') {
|
|
166
165
|
seriesItem.barMaxWidth = 40;
|
|
167
166
|
}
|
|
@@ -175,9 +174,6 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
175
174
|
yAxisIndex: item.yAxisIndex
|
|
176
175
|
} : {});
|
|
177
176
|
});
|
|
178
|
-
series.map(function (item) {
|
|
179
|
-
seriesObject[item.name] = item;
|
|
180
|
-
});
|
|
181
177
|
} else {
|
|
182
178
|
series = [_objectSpread(_objectSpread(_objectSpread({
|
|
183
179
|
name: seriesName || '',
|
|
@@ -193,14 +189,6 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
193
189
|
tooltip.axisPointer = tooltip.axisPointer || {};
|
|
194
190
|
tooltip.axisPointer.type = chartType === 'bar' || chartType === 'line_bar' || chartType === 'muit_y' ? 'shadow' : 'line';
|
|
195
191
|
tooltip.formatter = function (params) {
|
|
196
|
-
if (Object.keys(seriesObject).length > 0) {
|
|
197
|
-
params.map(function (item) {
|
|
198
|
-
var _minValues = seriesObject[item.seriesName].minValues;
|
|
199
|
-
var _mixValues = seriesObject[item.seriesName].maxValues;
|
|
200
|
-
item.minValues = _minValues ? _minValues[item.dataIndex] : null;
|
|
201
|
-
item.maxValues = _mixValues ? _mixValues[item.dataIndex] : null;
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
192
|
return tooltipFormatter ? tooltipFormatter(params) : tooltip.trigger === 'item' ? tooltipFormatterItemDefault(params, data.resultFormatMap, unit) : tooltipFormatterDefault(params, data.resultFormatMap, unit);
|
|
205
193
|
};
|
|
206
194
|
if (legendPosition === 'top') {
|
|
@@ -66,9 +66,7 @@ export var formatChartData = function formatChartData(data, showAll, showList, r
|
|
|
66
66
|
} else {
|
|
67
67
|
sData.push(_objectSpread(_objectSpread({
|
|
68
68
|
name: showName,
|
|
69
|
-
data: seriesItem.values
|
|
70
|
-
minValues: seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.minValues,
|
|
71
|
-
maxValues: seriesItem === null || seriesItem === void 0 ? void 0 : seriesItem.maxValues
|
|
69
|
+
data: seriesItem.values
|
|
72
70
|
}, seriesItem.stack ? {
|
|
73
71
|
stack: seriesItem.stack
|
|
74
72
|
} : {}), {}, {
|
|
@@ -20,22 +20,16 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params, resultFor
|
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
seriesMap[item.seriesName] = item.value;
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
return _data;
|
|
35
|
-
};
|
|
36
|
-
var lineLabel = unitHandle(item.value);
|
|
37
|
-
var minValues = (item.minValues || item.minValues === 0) && unitHandle(item.minValues);
|
|
38
|
-
var maxValues = (item.maxValues || item.maxValues === 0) && unitHandle(item.maxValues);
|
|
23
|
+
var lineLabel = item.value;
|
|
24
|
+
if (item.seriesName.indexOf('CTR') > -1) {
|
|
25
|
+
lineLabel += '%';
|
|
26
|
+
} else if (resultFormatMap && resultFormatMap[item.seriesName] && /percent/.test(resultFormatMap[item.seriesName])) {
|
|
27
|
+
lineLabel = util.toThousands(lineLabel) + '%';
|
|
28
|
+
} else if (unit && unit === 'time') {
|
|
29
|
+
lineLabel = util.timeFormat(lineLabel, 'hhhmmmsss', 1);
|
|
30
|
+
} else {
|
|
31
|
+
lineLabel = util.toThousands(lineLabel) + (unit || '');
|
|
32
|
+
}
|
|
39
33
|
var name = item.seriesName.trim();
|
|
40
34
|
if (item.seriesType === 'bar' && params.length === 1 && !name) {
|
|
41
35
|
name = (item.data && item.data.label ? item.data.label : item.name).trim();
|
|
@@ -43,11 +37,7 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params, resultFor
|
|
|
43
37
|
var nameArr = name.split('|:|');
|
|
44
38
|
name = nameArr[0];
|
|
45
39
|
var orderNum = nameArr[1];
|
|
46
|
-
|
|
47
|
-
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"".concat(orderNum ? 'biz-tooltip-order' : 'biz-tooltip-marker', "\" style=\"background:").concat(item.color, "\">").concat(orderNum || '', "</span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
|
|
48
|
-
} else {
|
|
49
|
-
htmlArray.push("<div class=\"biz-chart-tooltip-item-new\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"".concat(orderNum ? 'biz-tooltip-order' : 'biz-tooltip-marker', "\" style=\"background:").concat(item.color, "\">").concat(orderNum || '', "</span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <div>\n <div>\n <span>\u9884\u6D4B\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(lineLabel, "</span>\n </div>\n <div>\n <span>\u9884\u6D4B\u6700\u5927\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(maxValues, "</span>\n </div>\n <div>\n <span>\u9884\u6D4B\u6700\u5C0F\u503C\uFF1A</span>\n <span class=\"biz-chart-tooltip-item-new-value\">").concat(minValues, "</span>\n </div>\n </div>\n </div>"));
|
|
50
|
-
}
|
|
40
|
+
htmlArray.push("<div class=\"biz-chart-tooltip-item\">\n <div class=\"biz-chart-tooltip-content\">\n <span class=\"".concat(orderNum ? 'biz-tooltip-order' : 'biz-tooltip-marker', "\" style=\"background:").concat(item.color, "\">").concat(orderNum || '', "</span>\n <div class=\"biz-tooltip-name\">").concat(name, "</div>\n </div> \n <span class=\"biz-chart-tooltip-value\">").concat(lineLabel, "</span>\n </div>"));
|
|
51
41
|
});
|
|
52
42
|
return htmlArray.join('');
|
|
53
43
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.55-
|
|
3
|
+
"version": "1.2.55-ljy.0",
|
|
4
4
|
"module": "es/index.js",
|
|
5
5
|
"typings": "es/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"react": "^16.12.0 || ^17.0.0",
|
|
56
56
|
"yorkie": "^2.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "c3b4755b663cd4ae539e20baae7ec562e5aa7e59",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|