@zgfe/business-lib 1.2.66-hxd.2 → 1.2.70-hxd.1
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 +12 -12
- package/config.js +41 -41
- package/es/AUMFormulaTarget/components/formula/index.less +86 -86
- package/es/AUMFormulaTarget/components/panel/index.less +269 -269
- package/es/AUMFormulaTarget/components/symbol/index.less +49 -49
- package/es/AUMFormulaTarget/styles/index.less +74 -74
- package/es/addToPanel/styles/addPanel.less +25 -25
- package/es/addToPanel/styles/index.less +17 -17
- package/es/addToPanel/styles/style.less +66 -66
- package/es/addToScene/styles/index.less +30 -30
- package/es/assets/colorIcon/demo.css +539 -539
- package/es/assets/colorIcon/demo_index.html +1454 -1454
- package/es/assets/colorIcon/iconfont.css +236 -236
- package/es/assets/colorIcon/iconfont.json +394 -394
- package/es/assets/colorIcon/iconfont.svg +129 -129
- package/es/assets/iconfont/demo.css +539 -539
- package/es/assets/iconfont/demo_index.html +5593 -5363
- package/es/assets/iconfont/iconfont.css +955 -915
- package/es/assets/iconfont/iconfont.js +8 -8
- package/es/assets/iconfont/iconfont.json +1654 -1584
- 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/assets/styles/chunks.less +183 -183
- package/es/assets/styles/inner.less +3 -3
- package/es/assets/styles/resetAntd.less +564 -551
- package/es/assets/styles/variable.less +21 -21
- package/es/attrCondition/styles/index.less +101 -101
- package/es/attrConditions/components/operateList.js +4 -4
- package/es/attrConditions/components/valuesList.js +1 -1
- package/es/attrConditions/styles/group.less +49 -49
- package/es/attrConditions/styles/index.less +151 -151
- package/es/attributeSelector/index.js +3 -1
- package/es/attributeSelector/listPanel.js +2 -2
- package/es/attributeSelector/styles/index.less +141 -141
- package/es/attributeSelector/types.d.ts +1 -0
- package/es/attributeSelector/util.js +1 -0
- package/es/chart/demo/data/data7.d.ts +54 -0
- package/es/chart/demo/data/data7.js +1527 -0
- package/es/chart/demo/stack.d.ts +3 -0
- package/es/chart/demo/stack.js +31 -0
- package/es/chart/index.js +16 -6
- package/es/chart/styles/index.less +113 -113
- package/es/chart/types.d.ts +4 -1
- package/es/chart/util/chartOptionConfig.d.ts +4 -3
- package/es/chart/util/chartOptionConfig.js +84 -4
- package/es/chart/util/data/china.js +17 -17
- package/es/chart/util/formatData.d.ts +1 -0
- package/es/chart/util/formatData.js +13 -0
- package/es/cycleTime/index.js +1 -1
- package/es/cycleTime/styles/index.less +24 -24
- package/es/cycleTime/styles/month.less +95 -95
- package/es/dataSetGroup/styles/index.less +146 -146
- package/es/datePicker/index.js +6 -6
- package/es/datePicker/styles/index.less +53 -53
- package/es/datePickerV2/index.js +6 -3
- package/es/datePickerV2/popoverContent.d.ts +1 -0
- package/es/datePickerV2/popoverContent.js +3 -1
- package/es/datePickerV2/shortcut.d.ts +2 -0
- package/es/datePickerV2/shortcut.js +4 -3
- package/es/datePickerV2/styles/index.less +194 -194
- package/es/datePickerV2/types.d.ts +2 -0
- package/es/datePickerV2/utils.d.ts +1 -1
- package/es/datePickerV2/utils.js +5 -5
- package/es/demoWrapper/index.less +3 -3
- package/es/dialog/styles/index.less +22 -22
- package/es/dnd/styles/index.less +19 -19
- package/es/eventSelector/styles/index.less +123 -123
- package/es/formulaTarget/components/formula/index.less +76 -76
- package/es/formulaTarget/components/panel/index.less +139 -139
- package/es/formulaTarget/components/symbol/index.less +49 -49
- package/es/formulaTarget/styles/index.less +74 -74
- package/es/hooks/types/subject.d.ts +14 -14
- package/es/hooks/useBizStore.js +5 -2
- package/es/icon/demo/list.less +32 -32
- package/es/index.d.ts +4 -1
- package/es/index.js +4 -1
- package/es/layout/analysisLayout/demo/index.less +12 -12
- package/es/layout/analysisLayout/index.less +118 -118
- package/es/layout/columnLayout/demo/index.less +15 -15
- package/es/layout/columnLayout/index.less +81 -81
- package/es/layout/detail/index.less +27 -27
- package/es/layout/optionTitle/components/changePanelModal/styles/index.less +92 -92
- package/es/layout/optionTitle/demo/index.less +12 -12
- package/es/loading/styles/index.less +20 -20
- package/es/loginForm/index.less +7 -7
- package/es/platformSelector/styles/index.less +26 -26
- package/es/productCondition/conditions/order/runPeriodCondition.js +1 -1
- package/es/productCondition/conditions/periodCondition.js +1 -1
- package/es/productCondition/conditions/runTimesCondition.js +1 -1
- package/es/productCondition/conditions/styles/cdpCondition.less +31 -31
- package/es/productCondition/conditions/styles/cdpCshCondition.less +41 -41
- package/es/productCondition/conditions/styles/eventCondition.less +51 -51
- package/es/productCondition/conditions/styles/periodCondition.less +26 -26
- package/es/productCondition/conditions/styles/propCondition.less +43 -43
- package/es/productCondition/conditions/styles/runTimesCondition.less +19 -19
- package/es/productCondition/conditions/styles/tagsCondition.less +20 -20
- package/es/productCondition/conditions/styles/textDesc.less +17 -17
- package/es/productCondition/styles/conditionTypeList.less +30 -30
- package/es/productCondition/styles/conditionWrap.less +18 -18
- package/es/productCondition/styles/index.less +33 -33
- package/es/productCondition/styles/orConditions.less +34 -34
- package/es/productCondition/styles/relationLabel.less +19 -19
- package/es/quickDatePicker/styles/index.less +138 -138
- package/es/select/index.js +9 -1
- package/es/select/styles/handle.less +193 -193
- package/es/select/styles/index.less +129 -129
- package/es/select/types.d.ts +3 -2
- package/es/socket/demo/index.less +27 -27
- package/es/subjectWrapper/demo/index.d.ts +3 -0
- package/es/subjectWrapper/demo/index.js +28 -0
- package/es/subjectWrapper/index.d.ts +5 -0
- package/es/subjectWrapper/index.js +98 -0
- package/es/subjectWrapper/index.less +12 -0
- package/es/subjectWrapper/types.d.ts +14 -0
- package/es/subjectWrapper/types.js +4 -0
- package/es/table/styles/index.less +5 -5
- package/es/targetConditionGroup/demo/styles/index.less +29 -29
- package/es/targetConditionGroup/styles/index.less +53 -53
- package/es/targetSelector/styles/index.less +110 -110
- package/es/userCondition/conditions/cdpCshCondition.js +0 -1
- package/es/userCondition/conditions/order/runPeriodCondition.js +1 -1
- package/es/userCondition/conditions/periodCondition.js +1 -1
- package/es/userCondition/conditions/runTimesCondition.js +1 -1
- package/es/userCondition/conditions/styles/cdpCondition.less +37 -37
- package/es/userCondition/conditions/styles/cdpCshCondition.less +47 -47
- package/es/userCondition/conditions/styles/eventCondition.less +57 -57
- package/es/userCondition/conditions/styles/periodCondition.less +26 -26
- package/es/userCondition/conditions/styles/propCondition.less +43 -43
- package/es/userCondition/conditions/styles/runTimesCondition.less +19 -19
- package/es/userCondition/conditions/styles/tagsCondition.less +20 -20
- package/es/userCondition/conditions/styles/textDesc.less +17 -17
- package/es/userCondition/styles/conditionTypeList.less +30 -30
- package/es/userCondition/styles/conditionWrap.less +18 -18
- package/es/userCondition/styles/index.less +33 -33
- package/es/userCondition/styles/orConditions.less +34 -34
- package/es/userCondition/styles/relationLabel.less +19 -19
- package/es/userGroup/index.js +2 -2
- package/es/userGroup/styles/index.less +145 -145
- package/es/userGroupHeader/demo/index.js +1 -1
- package/es/userGroupHeader/styles/index.less +31 -31
- package/es/userTagsSelector/components/search/index.less +6 -6
- package/es/userTagsSelector/components/tagList/index.less +13 -13
- package/es/userTagsSelector/groups/styles/option.less +55 -55
- package/es/userTagsSelector/multipleCheckPanel/styles/option.less +40 -40
- package/es/userTagsSelector/styles/cascaderOverlay.less +34 -34
- package/es/userTagsSelector/styles/index.less +10 -10
- package/es/utils/util.d.ts +3 -0
- package/es/utils/util.js +10 -0
- package/package.json +62 -62
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useRef, useState } from 'react';
|
|
8
|
+
import { BizChart } from '@zgfe/business-lib';
|
|
9
|
+
import chartData from './data/data7';
|
|
10
|
+
import { Button } from 'antd';
|
|
11
|
+
export default (function () {
|
|
12
|
+
var chartRef = useRef();
|
|
13
|
+
var _useState = useState(true),
|
|
14
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
15
|
+
show = _useState2[0],
|
|
16
|
+
setShow = _useState2[1];
|
|
17
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
18
|
+
onClick: function onClick() {
|
|
19
|
+
return setShow(!show);
|
|
20
|
+
}
|
|
21
|
+
}, show ? '隐藏' : '显示'), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(BizChart, {
|
|
22
|
+
data: chartData,
|
|
23
|
+
type: "pie",
|
|
24
|
+
legendPosition: "bottom",
|
|
25
|
+
isHideLegend: true,
|
|
26
|
+
ref: chartRef,
|
|
27
|
+
showList: undefined,
|
|
28
|
+
showAll: true,
|
|
29
|
+
colors: undefined
|
|
30
|
+
}));
|
|
31
|
+
});
|
package/es/chart/index.js
CHANGED
|
@@ -13,9 +13,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
13
13
|
import React, { useEffect, useImperativeHandle, useState } from 'react';
|
|
14
14
|
import ReactEChartsCore from 'echarts-for-react/lib/core';
|
|
15
15
|
import * as echarts from 'echarts';
|
|
16
|
-
import { getChartOption, getPieOption, getMapOption } from './util/chartOptionConfig';
|
|
16
|
+
import { getChartOption, getPieOption, getMapOption, getStackingOption } from './util/chartOptionConfig';
|
|
17
17
|
import { provinceSeries, citySeries, maxMinValue } from './util/mapUtil';
|
|
18
|
-
import { formatPieData, formatChartData } from './util/formatData';
|
|
18
|
+
import { formatPieData, formatChartData, formatStackChartData } from './util/formatData';
|
|
19
19
|
import './util/data/china.js';
|
|
20
20
|
import moment from 'moment';
|
|
21
21
|
import _ from 'lodash';
|
|
@@ -44,7 +44,10 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
44
44
|
tooltipTrigger = props.tooltipTrigger,
|
|
45
45
|
muit_yAxis = props.muit_yAxis,
|
|
46
46
|
unContainLabel = props.unContainLabel,
|
|
47
|
-
markArea = props.markArea
|
|
47
|
+
markArea = props.markArea,
|
|
48
|
+
mergeOption = props.mergeOption,
|
|
49
|
+
mergeSeries = props.mergeSeries,
|
|
50
|
+
emphasisFocus = props.emphasisFocus;
|
|
48
51
|
var _useState = useState({}),
|
|
49
52
|
_useState2 = _slicedToArray(_useState, 2),
|
|
50
53
|
chartOption = _useState2[0],
|
|
@@ -123,10 +126,11 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
123
126
|
if (!data) return eOption;
|
|
124
127
|
if (type === 'pie') {
|
|
125
128
|
var rData = formatPieData(data, showAll, showList, props.showOther);
|
|
126
|
-
eOption = getPieOption(rData, legendPosition, legendOrient, props.showLabel, props.radius, props.center, tooltipFormatter);
|
|
129
|
+
eOption = getPieOption(rData, legendPosition, legendOrient, props.showLabel, props.radius, props.center, tooltipFormatter, undefined, mergeSeries, isHideLegend);
|
|
130
|
+
eOption.legend.padding = [20, 0, 0, 0];
|
|
127
131
|
} else if (type === 'line' || type === 'bar' || type === 'line_bar' || type === 'muit_y') {
|
|
128
132
|
var _rData = formatChartData(data, showAll, showList, reverseXAxis, colors, type === 'line_bar' || type === 'muit_y');
|
|
129
|
-
eOption = getChartOption(type, _rData, legendPosition, legendOrient, valueUnit, xRotate, yRotate, tooltipFormatter, xAxisFormatter, yAxisFormatter, legendFormatter, reverseXAxis, seriesName, isHideLegend, tooltipTrigger, muit_yAxis);
|
|
133
|
+
eOption = getChartOption(type, _rData, legendPosition, legendOrient, valueUnit, xRotate, yRotate, tooltipFormatter, xAxisFormatter, yAxisFormatter, legendFormatter, reverseXAxis, seriesName, isHideLegend, tooltipTrigger, muit_yAxis, mergeSeries);
|
|
130
134
|
if (type === 'line_bar' || type === 'muit_y') {
|
|
131
135
|
eOption.grid.right = '1%';
|
|
132
136
|
eOption.grid.left = '1%';
|
|
@@ -147,6 +151,9 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
147
151
|
var maxMin = maxMinValue(series[0]);
|
|
148
152
|
var showVisualMap = !(userGroup && userGroup.split(',').length > 1);
|
|
149
153
|
eOption = getMapOption(series, maxMin, showVisualMap, tooltipFormatter, isCity);
|
|
154
|
+
} else if (type === 'stack') {
|
|
155
|
+
formatStackChartData(data, showList, showAll);
|
|
156
|
+
eOption = getStackingOption(data, legendPosition, emphasisFocus);
|
|
150
157
|
}
|
|
151
158
|
if (colors) {
|
|
152
159
|
eOption.color = colors;
|
|
@@ -157,10 +164,13 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
157
164
|
if (data === null || data === void 0 ? void 0 : data.grid) {
|
|
158
165
|
eOption.grid = _objectSpread(_objectSpread({}, eOption.grid), data === null || data === void 0 ? void 0 : data.grid);
|
|
159
166
|
}
|
|
167
|
+
if (mergeOption) {
|
|
168
|
+
eOption = Object.assign(eOption, mergeOption);
|
|
169
|
+
}
|
|
160
170
|
setChartOption(function () {
|
|
161
171
|
return _objectSpread({}, eOption);
|
|
162
172
|
});
|
|
163
|
-
}, [data, showAll, showList, reverseXAxis, option]);
|
|
173
|
+
}, [data, showAll, showList, reverseXAxis, option, emphasisFocus]);
|
|
164
174
|
useImperativeHandle(ref, function () {
|
|
165
175
|
return {
|
|
166
176
|
instance: instance
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
@import '../../assets/styles/variable.less';
|
|
2
|
-
|
|
3
|
-
.biz-chart-tooltip {
|
|
4
|
-
max-height: 324px;
|
|
5
|
-
overflow: auto;
|
|
6
|
-
border-radius: 10px !important;
|
|
7
|
-
|
|
8
|
-
.biz-chart-tooltip-title {
|
|
9
|
-
margin-bottom: @margin-xss;
|
|
10
|
-
color: @text-color;
|
|
11
|
-
font-weight: 600;
|
|
12
|
-
font-size: @font-size-sm;
|
|
13
|
-
line-height: 17px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.biz-chart-tooltip-item {
|
|
17
|
-
display: flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
justify-content: space-between;
|
|
20
|
-
min-height: @height-sm;
|
|
21
|
-
padding: 0px @padding-xs;
|
|
22
|
-
font-size: @font-size-sm;
|
|
23
|
-
background: @white;
|
|
24
|
-
border-radius: @border-radius-small;
|
|
25
|
-
box-shadow: @box-shadow-small;
|
|
26
|
-
&:not(:last-child) {
|
|
27
|
-
margin-bottom: @margin-xss;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.biz-chart-tooltip-content {
|
|
31
|
-
display: flex;
|
|
32
|
-
align-items: center;
|
|
33
|
-
color: @text-color-secondary;
|
|
34
|
-
|
|
35
|
-
.biz-tooltip-marker {
|
|
36
|
-
width: 8px;
|
|
37
|
-
height: 8px;
|
|
38
|
-
margin-right: @margin-xs;
|
|
39
|
-
border-radius: 50%;
|
|
40
|
-
}
|
|
41
|
-
.biz-tooltip-order {
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
justify-content: center;
|
|
45
|
-
width: 12.8px;
|
|
46
|
-
height: 12.8px;
|
|
47
|
-
margin-right: @margin-xs;
|
|
48
|
-
color: #fff;
|
|
49
|
-
font-weight: 500;
|
|
50
|
-
font-size: 8.96px;
|
|
51
|
-
background: #457dff;
|
|
52
|
-
border-radius: 50%;
|
|
53
|
-
}
|
|
54
|
-
.biz-tooltip-name {
|
|
55
|
-
max-width: 300px;
|
|
56
|
-
white-space: pre-wrap;
|
|
57
|
-
word-wrap: break-word;
|
|
58
|
-
word-break: break-all;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.biz-chart-tooltip-value {
|
|
63
|
-
margin-left: @margin-xs;
|
|
64
|
-
color: @text-color;
|
|
65
|
-
font-weight: 500;
|
|
66
|
-
}
|
|
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
|
-
}
|
|
1
|
+
@import '../../assets/styles/variable.less';
|
|
2
|
+
|
|
3
|
+
.biz-chart-tooltip {
|
|
4
|
+
max-height: 324px;
|
|
5
|
+
overflow: auto;
|
|
6
|
+
border-radius: 10px !important;
|
|
7
|
+
|
|
8
|
+
.biz-chart-tooltip-title {
|
|
9
|
+
margin-bottom: @margin-xss;
|
|
10
|
+
color: @text-color;
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
font-size: @font-size-sm;
|
|
13
|
+
line-height: 17px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.biz-chart-tooltip-item {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
min-height: @height-sm;
|
|
21
|
+
padding: 0px @padding-xs;
|
|
22
|
+
font-size: @font-size-sm;
|
|
23
|
+
background: @white;
|
|
24
|
+
border-radius: @border-radius-small;
|
|
25
|
+
box-shadow: @box-shadow-small;
|
|
26
|
+
&:not(:last-child) {
|
|
27
|
+
margin-bottom: @margin-xss;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.biz-chart-tooltip-content {
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
color: @text-color-secondary;
|
|
34
|
+
|
|
35
|
+
.biz-tooltip-marker {
|
|
36
|
+
width: 8px;
|
|
37
|
+
height: 8px;
|
|
38
|
+
margin-right: @margin-xs;
|
|
39
|
+
border-radius: 50%;
|
|
40
|
+
}
|
|
41
|
+
.biz-tooltip-order {
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
width: 12.8px;
|
|
46
|
+
height: 12.8px;
|
|
47
|
+
margin-right: @margin-xs;
|
|
48
|
+
color: #fff;
|
|
49
|
+
font-weight: 500;
|
|
50
|
+
font-size: 8.96px;
|
|
51
|
+
background: #457dff;
|
|
52
|
+
border-radius: 50%;
|
|
53
|
+
}
|
|
54
|
+
.biz-tooltip-name {
|
|
55
|
+
max-width: 300px;
|
|
56
|
+
white-space: pre-wrap;
|
|
57
|
+
word-wrap: break-word;
|
|
58
|
+
word-break: break-all;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.biz-chart-tooltip-value {
|
|
63
|
+
margin-left: @margin-xs;
|
|
64
|
+
color: @text-color;
|
|
65
|
+
font-weight: 500;
|
|
66
|
+
}
|
|
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
|
+
}
|
package/es/chart/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EChartsOption } from 'echarts';
|
|
1
|
+
import { EChartsOption, SeriesOption } from 'echarts';
|
|
2
2
|
import { GridOption } from 'echarts/types/dist/shared';
|
|
3
3
|
export interface ChartItmProps {
|
|
4
4
|
names: Array<string>;
|
|
@@ -59,5 +59,8 @@ export declare namespace ChartTypes {
|
|
|
59
59
|
muit_yAxis?: {}[];
|
|
60
60
|
unContainLabel?: boolean;
|
|
61
61
|
markArea?: boolean;
|
|
62
|
+
mergeOption?: EChartsOption;
|
|
63
|
+
mergeSeries?: SeriesOption;
|
|
64
|
+
emphasisFocus?: null | string;
|
|
62
65
|
}
|
|
63
66
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridComponentOption, TitleComponentOption, TooltipComponentOption } from 'echarts/types/dist/echarts';
|
|
1
|
+
import { GridComponentOption, SeriesOption, TitleComponentOption, TooltipComponentOption } from 'echarts/types/dist/echarts';
|
|
2
2
|
import { BarSeriesOption, GridOption, LegendComponentOption, LineSeriesOption, PieSeriesOption, ToolboxComponentOption, XAXisOption, YAXisOption } from 'echarts/types/dist/shared';
|
|
3
3
|
import '../styles/index.less';
|
|
4
4
|
import { ChartTypes } from '../types';
|
|
@@ -10,10 +10,11 @@ export declare const gridConfig: GridOption;
|
|
|
10
10
|
export declare const xAxisConfig: XAXisOption;
|
|
11
11
|
export declare const yAxisConfig: YAXisOption;
|
|
12
12
|
export declare const tooltipConfig: TooltipComponentOption;
|
|
13
|
+
export declare const getStackingOption: (data: ChartTypes.Value, legendPosition?: 'top' | 'bottom' | 'middle', emphasisFocus?: null | string) => any;
|
|
13
14
|
export declare const getChartOption: (chartType: string, data: ChartTypes.Value, legendPosition?: 'top' | 'bottom' | 'middle', legendOrient?: 'horizontal' | 'vertical', unit?: string, xRotate?: number, yRotate?: number, tooltipFormatter?: ((value: any) => string) | undefined, xAxisFormatter?: ((value: any) => string) | undefined, yAxisFormatter?: ((value: any) => string) | undefined, legendFormatter?: ((value: any) => string) | undefined, reverseXAxis?: boolean, seriesName?: string, isHideLegend?: boolean, tooltipTrigger?: string, muit_yAxis?: {
|
|
14
15
|
name?: string;
|
|
15
|
-
}[]) => EChartsOption;
|
|
16
|
-
export declare const getPieOption: (seriesData?: object[], legendPosition?: 'top' | 'bottom' | 'middle', legendOrient?: 'horizontal' | 'vertical', showLabel?: boolean, radius?: string | number | Array<string | number>, center?: Array<string | number>, tooltipFormatter?: ((value: any) => string) | undefined, legendFormatter?: ((value: any) => string) | undefined) => EChartsOption;
|
|
16
|
+
}[], mergeSeries?: SeriesOption) => EChartsOption;
|
|
17
|
+
export declare const getPieOption: (seriesData?: object[], legendPosition?: 'top' | 'bottom' | 'middle', legendOrient?: 'horizontal' | 'vertical', showLabel?: boolean, radius?: string | number | Array<string | number>, center?: Array<string | number>, tooltipFormatter?: ((value: any) => string) | undefined, legendFormatter?: ((value: any) => string) | undefined, mergeSeries?: SeriesOption, isHideLegend?: boolean) => EChartsOption;
|
|
17
18
|
export declare const getMapOption: (seriesData: object[] | undefined, maxMinValue: {
|
|
18
19
|
min: number;
|
|
19
20
|
max: number;
|
|
@@ -101,7 +101,7 @@ export var tooltipConfig = {
|
|
|
101
101
|
padding: 8,
|
|
102
102
|
extraCssText: '0px 4px 10px rgba(0, 0, 0, 0.1)',
|
|
103
103
|
className: 'biz-chart-tooltip',
|
|
104
|
-
appendToBody: true,
|
|
104
|
+
appendToBody: util.isMobile() ? false : true,
|
|
105
105
|
axisPointer: {
|
|
106
106
|
type: 'shadow',
|
|
107
107
|
z: 0,
|
|
@@ -110,6 +110,77 @@ export var tooltipConfig = {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
|
+
export var getStackingOption = function getStackingOption(data) {
|
|
114
|
+
var legendPosition = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'bottom';
|
|
115
|
+
var emphasisFocus = arguments.length > 2 ? arguments[2] : undefined;
|
|
116
|
+
var tooltip = JSON.parse(JSON.stringify(tooltipConfig));
|
|
117
|
+
var xAxis = [{
|
|
118
|
+
type: 'category',
|
|
119
|
+
data: data.xAxis
|
|
120
|
+
}];
|
|
121
|
+
var yAxis = [{
|
|
122
|
+
type: 'value'
|
|
123
|
+
}];
|
|
124
|
+
var grid = {
|
|
125
|
+
left: '1%',
|
|
126
|
+
right: '1%',
|
|
127
|
+
bottom: 45,
|
|
128
|
+
top: 24,
|
|
129
|
+
containLabel: true
|
|
130
|
+
};
|
|
131
|
+
var legend = {
|
|
132
|
+
icon: 'circle',
|
|
133
|
+
type: 'scroll',
|
|
134
|
+
itemHeight: 10,
|
|
135
|
+
itemWidth: 10,
|
|
136
|
+
itemGap: 21,
|
|
137
|
+
itemStyle: {
|
|
138
|
+
borderCap: 'round'
|
|
139
|
+
},
|
|
140
|
+
z: 10,
|
|
141
|
+
textStyle: {
|
|
142
|
+
color: '#5F6085',
|
|
143
|
+
height: 10,
|
|
144
|
+
rich: {
|
|
145
|
+
a: {
|
|
146
|
+
verticalAlign: 'bottom'
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
pageTextStyle: {
|
|
151
|
+
color: '#5F6085'
|
|
152
|
+
},
|
|
153
|
+
tooltip: {
|
|
154
|
+
show: true
|
|
155
|
+
},
|
|
156
|
+
top: 'bottom',
|
|
157
|
+
orient: 'horizontal'
|
|
158
|
+
};
|
|
159
|
+
var series = data.series.map(function (item) {
|
|
160
|
+
return {
|
|
161
|
+
name: item.names.join(','),
|
|
162
|
+
type: 'bar',
|
|
163
|
+
barMaxWidth: 40,
|
|
164
|
+
barWidth: 'auto',
|
|
165
|
+
stack: 'all',
|
|
166
|
+
emphasis: {
|
|
167
|
+
focus: emphasisFocus !== undefined ? emphasisFocus : 'series'
|
|
168
|
+
},
|
|
169
|
+
data: item.values
|
|
170
|
+
};
|
|
171
|
+
});
|
|
172
|
+
legend.top = legendPosition || 'bottom';
|
|
173
|
+
legend.icon = 'circle';
|
|
174
|
+
var _data = _objectSpread(_objectSpread({}, baseConfig), {}, {
|
|
175
|
+
legend: legend,
|
|
176
|
+
xAxis: xAxis,
|
|
177
|
+
yAxis: yAxis,
|
|
178
|
+
tooltip: tooltip,
|
|
179
|
+
grid: grid,
|
|
180
|
+
series: series
|
|
181
|
+
});
|
|
182
|
+
return _data;
|
|
183
|
+
};
|
|
113
184
|
export var getChartOption = function getChartOption(chartType, data) {
|
|
114
185
|
var legendPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'bottom';
|
|
115
186
|
var legendOrient = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'horizontal';
|
|
@@ -125,6 +196,7 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
125
196
|
var isHideLegend = arguments.length > 13 ? arguments[13] : undefined;
|
|
126
197
|
var tooltipTrigger = arguments.length > 14 ? arguments[14] : undefined;
|
|
127
198
|
var muit_yAxis = arguments.length > 15 ? arguments[15] : undefined;
|
|
199
|
+
var mergeSeries = arguments.length > 16 ? arguments[16] : undefined;
|
|
128
200
|
var xAxis = JSON.parse(JSON.stringify(xAxisConfig)),
|
|
129
201
|
tooltip = JSON.parse(JSON.stringify(tooltipConfig)),
|
|
130
202
|
yAxis = _objectSpread({}, yAxisConfig),
|
|
@@ -167,13 +239,13 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
167
239
|
}
|
|
168
240
|
if (!reverseXAxis) {
|
|
169
241
|
series = data.series.map(function (item) {
|
|
170
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, item), seriesItem), {}, {
|
|
242
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, item), seriesItem), {}, {
|
|
171
243
|
type: chartType === 'line_bar' || chartType === 'muit_y' ? item.type : chartType
|
|
172
244
|
}, chartType === 'line_bar' ? {
|
|
173
245
|
yAxisIndex: item.type === 'line' ? 1 : 0
|
|
174
246
|
} : {}), chartType === 'muit_y' ? {
|
|
175
247
|
yAxisIndex: item.yAxisIndex
|
|
176
|
-
} : {});
|
|
248
|
+
} : {}), mergeSeries ? mergeSeries : {});
|
|
177
249
|
});
|
|
178
250
|
series.map(function (item) {
|
|
179
251
|
seriesObject[item.name] = item;
|
|
@@ -250,6 +322,8 @@ export var getPieOption = function getPieOption() {
|
|
|
250
322
|
var center = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : ['50%', '50%'];
|
|
251
323
|
var tooltipFormatter = arguments.length > 6 ? arguments[6] : undefined;
|
|
252
324
|
var legendFormatter = arguments.length > 7 ? arguments[7] : undefined;
|
|
325
|
+
var mergeSeries = arguments.length > 8 ? arguments[8] : undefined;
|
|
326
|
+
var isHideLegend = arguments.length > 9 ? arguments[9] : undefined;
|
|
253
327
|
var series = [{
|
|
254
328
|
type: 'pie',
|
|
255
329
|
data: seriesData,
|
|
@@ -301,10 +375,16 @@ export var getPieOption = function getPieOption() {
|
|
|
301
375
|
}
|
|
302
376
|
}
|
|
303
377
|
}];
|
|
378
|
+
if (mergeSeries) {
|
|
379
|
+
series[0] = _objectSpread(_objectSpread({}, series[0]), mergeSeries);
|
|
380
|
+
}
|
|
304
381
|
var tooltip = JSON.parse(JSON.stringify(tooltipConfig)),
|
|
305
382
|
legend = _objectSpread({}, legendConfig),
|
|
306
383
|
grid = _objectSpread({}, gridConfig);
|
|
307
384
|
legend.top = legendPosition;
|
|
385
|
+
if (isHideLegend) {
|
|
386
|
+
legend.show = false;
|
|
387
|
+
}
|
|
308
388
|
legend.orient = legendOrient;
|
|
309
389
|
legend.icon = 'circle';
|
|
310
390
|
if (legendOrient === 'vertical') {
|
|
@@ -384,7 +464,7 @@ export var getMapOption = function getMapOption() {
|
|
|
384
464
|
bottom: '20',
|
|
385
465
|
feature: {
|
|
386
466
|
saveAsImage: {
|
|
387
|
-
show: true,
|
|
467
|
+
show: util.isMobile() ? false : true,
|
|
388
468
|
title: '保存为图片'
|
|
389
469
|
}
|
|
390
470
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
/*
|
|
3
|
-
* Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
-
* or more contributor license agreements. See the NOTICE file
|
|
5
|
-
* distributed with this work for additional information
|
|
6
|
-
* regarding copyright ownership. The ASF licenses this file
|
|
7
|
-
* to you under the Apache License, Version 2.0 (the
|
|
8
|
-
* "License"); you may not use this file except in compliance
|
|
9
|
-
* with the License. You may obtain a copy of the License at
|
|
10
|
-
*
|
|
11
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
-
*
|
|
13
|
-
* Unless required by applicable law or agreed to in writing,
|
|
14
|
-
* software distributed under the License is distributed on an
|
|
15
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
-
* KIND, either express or implied. See the License for the
|
|
17
|
-
* specific language governing permissions and limitations
|
|
18
|
-
* under the License.
|
|
2
|
+
/*
|
|
3
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
+
* or more contributor license agreements. See the NOTICE file
|
|
5
|
+
* distributed with this work for additional information
|
|
6
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
7
|
+
* to you under the Apache License, Version 2.0 (the
|
|
8
|
+
* "License"); you may not use this file except in compliance
|
|
9
|
+
* with the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing,
|
|
14
|
+
* software distributed under the License is distributed on an
|
|
15
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
* KIND, either express or implied. See the License for the
|
|
17
|
+
* specific language governing permissions and limitations
|
|
18
|
+
* under the License.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
(function (root, factory) {
|
|
@@ -84,6 +84,19 @@ export var formatChartData = function formatChartData(data, showAll, showList, r
|
|
|
84
84
|
resultFormatMap: resultFormatMap
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
|
+
export var formatStackChartData = function formatStackChartData(data, showList, showAll) {
|
|
88
|
+
var showMap = getShowMap(showList);
|
|
89
|
+
var _seriesData = [];
|
|
90
|
+
data.series.forEach(function (seriesItem) {
|
|
91
|
+
var name = seriesItem.names.join(',');
|
|
92
|
+
var showName = "".concat(name).concat(seriesItem.orderNum ? '|:|' + seriesItem.orderNum : '');
|
|
93
|
+
if (showAll || showList && showMap[showName] || (!showList || showList.length <= 0) && _seriesData.length < 10) {
|
|
94
|
+
_seriesData.push(seriesItem);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
data.series = _seriesData;
|
|
98
|
+
return;
|
|
99
|
+
};
|
|
87
100
|
var getShowMap = function getShowMap(showList) {
|
|
88
101
|
var data = {};
|
|
89
102
|
if (showList) {
|
package/es/cycleTime/index.js
CHANGED
|
@@ -151,7 +151,7 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
151
151
|
disable: disable,
|
|
152
152
|
onChange: function onChange(v) {
|
|
153
153
|
setDay([]);
|
|
154
|
-
setTime(showHour && v.value !== CycleTimeUnit.custom ? '00' : undefined);
|
|
154
|
+
setTime(showHour && (v === null || v === void 0 ? void 0 : v.value) !== CycleTimeUnit.custom ? '00' : undefined);
|
|
155
155
|
setUnit(v);
|
|
156
156
|
}
|
|
157
157
|
}), unit.value === CycleTimeUnit.week && /*#__PURE__*/React.createElement(BizSelect, {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
@import '../../assets//styles/inner.less';
|
|
2
|
-
.biz-cycle-time {
|
|
3
|
-
display: flex;
|
|
4
|
-
gap: 12px;
|
|
5
|
-
&-unit {
|
|
6
|
-
width: 129px;
|
|
7
|
-
}
|
|
8
|
-
&-day {
|
|
9
|
-
width: 280px;
|
|
10
|
-
vertical-align: top;
|
|
11
|
-
&.multi {
|
|
12
|
-
width: 470px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
&-unit,
|
|
16
|
-
&-day,
|
|
17
|
-
&-hour {
|
|
18
|
-
display: inline-block;
|
|
19
|
-
}
|
|
20
|
-
&-hour {
|
|
21
|
-
width: 220px;
|
|
22
|
-
vertical-align: top;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
1
|
+
@import '../../assets//styles/inner.less';
|
|
2
|
+
.biz-cycle-time {
|
|
3
|
+
display: flex;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
&-unit {
|
|
6
|
+
width: 129px;
|
|
7
|
+
}
|
|
8
|
+
&-day {
|
|
9
|
+
width: 280px;
|
|
10
|
+
vertical-align: top;
|
|
11
|
+
&.multi {
|
|
12
|
+
width: 470px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
&-unit,
|
|
16
|
+
&-day,
|
|
17
|
+
&-hour {
|
|
18
|
+
display: inline-block;
|
|
19
|
+
}
|
|
20
|
+
&-hour {
|
|
21
|
+
width: 220px;
|
|
22
|
+
vertical-align: top;
|
|
23
|
+
}
|
|
24
|
+
}
|