@zgfe/business-lib 1.2.29-aum.5 → 1.2.31
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/AUMFormulaTarget/components/formula/index.js +4 -45
- package/es/AUMFormulaTarget/components/formula/types.d.ts +1 -2
- package/es/AUMFormulaTarget/index.js +3 -6
- package/es/AUMFormulaTarget/types.d.ts +0 -1
- package/es/attrConditions/utils/operates.js +0 -3
- package/es/attributeSelector/demo/index.js +1 -1
- package/es/attributeSelector/index.js +4 -2
- package/es/attributeSelector/listPanel.js +3 -2
- package/es/attributeSelector/types.d.ts +1 -0
- package/es/chart/demo/data/data6.d.ts +19 -0
- package/es/chart/demo/data/data6.js +51 -0
- package/es/chart/demo/muit_y.d.ts +3 -0
- package/es/chart/demo/muit_y.js +18 -0
- package/es/chart/index.js +6 -5
- package/es/chart/types.d.ts +2 -1
- package/es/chart/util/chartOptionConfig.d.ts +3 -1
- package/es/chart/util/chartOptionConfig.js +24 -8
- package/es/chart/util/formatData.js +2 -1
- package/es/select/handle.js +2 -2
- package/package.json +2 -2
|
@@ -28,17 +28,13 @@ var FormulaContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
28
28
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
29
29
|
fieldValue = _useState6[0],
|
|
30
30
|
setFieldValue = _useState6[1];
|
|
31
|
-
var _useState7 = useState(),
|
|
32
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
33
|
-
fieldMaxValue = _useState8[0],
|
|
34
|
-
setFieldMaxValue = _useState8[1];
|
|
35
31
|
useEffect(function () {
|
|
36
32
|
init();
|
|
37
33
|
}, []);
|
|
38
34
|
useEffect(function () {
|
|
39
35
|
var item = formatTarget(targetList, 1);
|
|
40
|
-
props.onChange && props.onChange(item.formulaList, item.formula, operator === null || operator === void 0 ? void 0 : operator.value, fieldValue
|
|
41
|
-
}, [targetList, operator, fieldValue
|
|
36
|
+
props.onChange && props.onChange(item.formulaList, item.formula, operator === null || operator === void 0 ? void 0 : operator.value, fieldValue);
|
|
37
|
+
}, [targetList, operator, fieldValue]);
|
|
42
38
|
useImperativeHandle(ref, function () {
|
|
43
39
|
return {
|
|
44
40
|
reset: init
|
|
@@ -49,7 +45,6 @@ var FormulaContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
49
45
|
value: props.operator
|
|
50
46
|
});
|
|
51
47
|
setFieldValue(props.fieldValue);
|
|
52
|
-
setFieldMaxValue(props.fieldMaxValue);
|
|
53
48
|
setTargetList(targetsFormat(props.formula, props.value, 1));
|
|
54
49
|
};
|
|
55
50
|
var _onChange = function onChange(index, data) {
|
|
@@ -143,43 +138,7 @@ var FormulaContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
143
138
|
overlayWidth: 96,
|
|
144
139
|
value: operator,
|
|
145
140
|
onChange: onOperateChange
|
|
146
|
-
}), operator && operator.value === 'between' ? /*#__PURE__*/React.createElement("span", {
|
|
147
|
-
style: {
|
|
148
|
-
display: 'flex'
|
|
149
|
-
}
|
|
150
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
151
|
-
style: {
|
|
152
|
-
marginLeft: 16,
|
|
153
|
-
borderWidth: 0
|
|
154
|
-
},
|
|
155
|
-
type: "number",
|
|
156
|
-
value: fieldValue,
|
|
157
|
-
placeholder: "\u8BF7\u8F93\u5165\u6700\u5C0F\u503C",
|
|
158
|
-
onChange: function onChange(e) {
|
|
159
|
-
var _e$target$value;
|
|
160
|
-
e.persist();
|
|
161
|
-
var str = (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.slice(0, 20);
|
|
162
|
-
var xsStr = str.split('.')[1] ? str.split('.')[1].slice(0, 2) : '';
|
|
163
|
-
var dealStr = xsStr ? str.split('.')[0] + '.' + xsStr : str;
|
|
164
|
-
setFieldValue(dealStr);
|
|
165
|
-
}
|
|
166
141
|
}), /*#__PURE__*/React.createElement(Input, {
|
|
167
|
-
style: {
|
|
168
|
-
marginLeft: 16,
|
|
169
|
-
borderWidth: 0
|
|
170
|
-
},
|
|
171
|
-
type: "number",
|
|
172
|
-
value: fieldMaxValue,
|
|
173
|
-
placeholder: "\u8BF7\u8F93\u5165\u6700\u5927\u503C",
|
|
174
|
-
onChange: function onChange(e) {
|
|
175
|
-
var _e$target$value2;
|
|
176
|
-
e.persist();
|
|
177
|
-
var str = (_e$target$value2 = e.target.value) === null || _e$target$value2 === void 0 ? void 0 : _e$target$value2.slice(0, 20);
|
|
178
|
-
var xsStr = str.split('.')[1] ? str.split('.')[1].slice(0, 2) : '';
|
|
179
|
-
var dealStr = xsStr ? str.split('.')[0] + '.' + xsStr : str;
|
|
180
|
-
setFieldMaxValue(dealStr);
|
|
181
|
-
}
|
|
182
|
-
})) : /*#__PURE__*/React.createElement(Input, {
|
|
183
142
|
style: {
|
|
184
143
|
marginLeft: 16,
|
|
185
144
|
borderWidth: 0
|
|
@@ -188,9 +147,9 @@ var FormulaContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
188
147
|
value: fieldValue,
|
|
189
148
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
190
149
|
onChange: function onChange(e) {
|
|
191
|
-
var _e$target$
|
|
150
|
+
var _e$target$value;
|
|
192
151
|
e.persist();
|
|
193
|
-
var str = (_e$target$
|
|
152
|
+
var str = (_e$target$value = e.target.value) === null || _e$target$value === void 0 ? void 0 : _e$target$value.slice(0, 20);
|
|
194
153
|
var xsStr = str.split('.')[1] ? str.split('.')[1].slice(0, 2) : '';
|
|
195
154
|
var dealStr = xsStr ? str.split('.')[0] + '.' + xsStr : str;
|
|
196
155
|
setFieldValue(dealStr);
|
|
@@ -6,8 +6,7 @@ export declare namespace FormulaContainerTypes {
|
|
|
6
6
|
resultFormat?: string;
|
|
7
7
|
operator?: string;
|
|
8
8
|
fieldValue?: string;
|
|
9
|
-
|
|
10
|
-
onChange?: (formulaList: TargetConditionTypes.Value[], formula: string, operator?: string, fieldValue?: string, fieldMaxValue?: string) => void;
|
|
9
|
+
onChange?: (formulaList: TargetConditionTypes.Value[], formula: string, operator?: string, fieldValue?: string) => void;
|
|
11
10
|
}
|
|
12
11
|
type Value = null | string | TargetConditionTypes.Value;
|
|
13
12
|
interface FormulaItemValue {
|
|
@@ -19,23 +19,21 @@ var BizFormulaTarget = function BizFormulaTarget(props) {
|
|
|
19
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
20
20
|
condition = _useState2[0],
|
|
21
21
|
setCondition = _useState2[1];
|
|
22
|
-
var onChange = function onChange(customCondition, formula, operator, fieldValue
|
|
22
|
+
var onChange = function onChange(customCondition, formula, operator, fieldValue) {
|
|
23
23
|
setCondition(function (value) {
|
|
24
24
|
props.onChange && props.onChange(_objectSpread(_objectSpread({}, value), {}, {
|
|
25
25
|
alias: (value || {}).eventName,
|
|
26
26
|
customCondition: customCondition,
|
|
27
27
|
formula: formula,
|
|
28
28
|
operator: operator,
|
|
29
|
-
fieldValue: fieldValue
|
|
30
|
-
fieldMaxValue: fieldMaxValue
|
|
29
|
+
fieldValue: fieldValue
|
|
31
30
|
}));
|
|
32
31
|
return _objectSpread(_objectSpread({}, value), {}, {
|
|
33
32
|
alias: (value || {}).eventName,
|
|
34
33
|
customCondition: customCondition,
|
|
35
34
|
formula: formula,
|
|
36
35
|
operator: operator,
|
|
37
|
-
fieldValue: fieldValue
|
|
38
|
-
fieldMaxValue: fieldMaxValue
|
|
36
|
+
fieldValue: fieldValue
|
|
39
37
|
});
|
|
40
38
|
});
|
|
41
39
|
};
|
|
@@ -46,7 +44,6 @@ var BizFormulaTarget = function BizFormulaTarget(props) {
|
|
|
46
44
|
formula: (condition || {}).formula,
|
|
47
45
|
operator: (condition || {}).operator,
|
|
48
46
|
fieldValue: (condition || {}).fieldValue,
|
|
49
|
-
fieldMaxValue: (condition || {}).fieldMaxValue,
|
|
50
47
|
onChange: onChange
|
|
51
48
|
}));
|
|
52
49
|
};
|
|
@@ -24,7 +24,8 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
24
24
|
theme = props.theme,
|
|
25
25
|
extra = props.extra,
|
|
26
26
|
isNumber = props.isNumber,
|
|
27
|
-
overlayClassName = props.overlayClassName
|
|
27
|
+
overlayClassName = props.overlayClassName,
|
|
28
|
+
isStrNum = props.isStrNum;
|
|
28
29
|
var _useState = useState(),
|
|
29
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
31
|
currentAttr = _useState2[0],
|
|
@@ -122,7 +123,8 @@ var BizAttributeSelector = function BizAttributeSelector(props) {
|
|
|
122
123
|
}, props), {}, {
|
|
123
124
|
value: currentAttr,
|
|
124
125
|
onChange: onChange,
|
|
125
|
-
isNumber: isNumber
|
|
126
|
+
isNumber: isNumber,
|
|
127
|
+
isStrNum: isStrNum
|
|
126
128
|
}));
|
|
127
129
|
},
|
|
128
130
|
trigger: ['click'],
|
|
@@ -24,7 +24,8 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
24
24
|
eventIdList = props.eventIdList,
|
|
25
25
|
funnelEventIdList = props.funnelEventIdList,
|
|
26
26
|
extra = props.extra,
|
|
27
|
-
isNumber = props.isNumber
|
|
27
|
+
isNumber = props.isNumber,
|
|
28
|
+
isStrNum = props.isStrNum;
|
|
28
29
|
var _useState = useState(''),
|
|
29
30
|
_useState2 = _slicedToArray(_useState, 2),
|
|
30
31
|
searchValue = _useState2[0],
|
|
@@ -158,7 +159,7 @@ var AttrListPanel = function AttrListPanel(props) {
|
|
|
158
159
|
anchor: hasAnchor ? String(Math.random()) : anchor.event,
|
|
159
160
|
key: "event-".concat(event.id),
|
|
160
161
|
children: event.attrList.slice().filter(function (item) {
|
|
161
|
-
return isNumber ? item.type === 2 : true;
|
|
162
|
+
return isStrNum ? item.type === 2 || item.type === 1 : isNumber ? item.type === 2 : true;
|
|
162
163
|
})
|
|
163
164
|
};
|
|
164
165
|
list.push(group);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
series: ({
|
|
3
|
+
type: string;
|
|
4
|
+
names: string[];
|
|
5
|
+
values: number[];
|
|
6
|
+
yAxisIndex: number;
|
|
7
|
+
duration?: undefined;
|
|
8
|
+
index?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
duration: never[];
|
|
11
|
+
type: string;
|
|
12
|
+
index: string;
|
|
13
|
+
names: string[];
|
|
14
|
+
values: number[];
|
|
15
|
+
yAxisIndex: number;
|
|
16
|
+
})[];
|
|
17
|
+
xAxis: string[];
|
|
18
|
+
};
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
series: [{
|
|
3
|
+
type: 'bar',
|
|
4
|
+
names: ['histogramFirstUv1'],
|
|
5
|
+
values: [12, 23, 34, 45, 56],
|
|
6
|
+
yAxisIndex: 0
|
|
7
|
+
}, {
|
|
8
|
+
duration: [],
|
|
9
|
+
type: 'bar',
|
|
10
|
+
index: '人数',
|
|
11
|
+
names: ['histogramSecondUv2'],
|
|
12
|
+
values: [21, 32, 43, 54, 65],
|
|
13
|
+
yAxisIndex: 0
|
|
14
|
+
}, {
|
|
15
|
+
duration: [],
|
|
16
|
+
type: 'bar',
|
|
17
|
+
index: '人数',
|
|
18
|
+
names: ['lineChartFirstUv3'],
|
|
19
|
+
values: [1123, 3123, 1233, 2231, 4322],
|
|
20
|
+
yAxisIndex: 1
|
|
21
|
+
}, {
|
|
22
|
+
duration: [],
|
|
23
|
+
type: 'bar',
|
|
24
|
+
index: '人数',
|
|
25
|
+
names: ['lineChartSecondUv4'],
|
|
26
|
+
values: [2133, 1235, 4321, 2234, 2323],
|
|
27
|
+
yAxisIndex: 1
|
|
28
|
+
}, {
|
|
29
|
+
duration: [],
|
|
30
|
+
type: 'bar',
|
|
31
|
+
index: '人数',
|
|
32
|
+
names: ['lineChartSecondUv5'],
|
|
33
|
+
values: [3242, 2342, 4234, 2123, 3242],
|
|
34
|
+
yAxisIndex: 1
|
|
35
|
+
}, {
|
|
36
|
+
duration: [],
|
|
37
|
+
type: 'bar',
|
|
38
|
+
index: '人数',
|
|
39
|
+
names: ['lineChartSecondUv6'],
|
|
40
|
+
values: [2343, 3242, 3434, 4352, 2344],
|
|
41
|
+
yAxisIndex: 1
|
|
42
|
+
}, {
|
|
43
|
+
duration: [],
|
|
44
|
+
type: 'line',
|
|
45
|
+
index: '额度',
|
|
46
|
+
names: ['lineChartFirstNv'],
|
|
47
|
+
values: [0.1, 0.2, 0.3, 0.4, 0.5],
|
|
48
|
+
yAxisIndex: 2
|
|
49
|
+
}],
|
|
50
|
+
xAxis: ['2023-10-25 00:00:00', '2023-10-25 01:00:00', '2023-10-25 02:00:00', '2023-10-25 03:00:00', '2023-10-25 04:00:00']
|
|
51
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BizChart } from '@zgfe/business-lib';
|
|
3
|
+
import data from './data/data6';
|
|
4
|
+
export default (function () {
|
|
5
|
+
return /*#__PURE__*/React.createElement(BizChart, {
|
|
6
|
+
data: data,
|
|
7
|
+
type: "muit_y",
|
|
8
|
+
showAll: false,
|
|
9
|
+
legendPosition: "bottom",
|
|
10
|
+
muit_yAxis: [{
|
|
11
|
+
name: '单位:张'
|
|
12
|
+
}, {
|
|
13
|
+
name: '单位:百万'
|
|
14
|
+
}, {
|
|
15
|
+
show: false
|
|
16
|
+
}]
|
|
17
|
+
});
|
|
18
|
+
});
|
package/es/chart/index.js
CHANGED
|
@@ -41,7 +41,8 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
41
41
|
legendOrient = props.legendOrient,
|
|
42
42
|
autoHeight = props.autoHeight,
|
|
43
43
|
isHideLegend = props.isHideLegend,
|
|
44
|
-
tooltipTrigger = props.tooltipTrigger
|
|
44
|
+
tooltipTrigger = props.tooltipTrigger,
|
|
45
|
+
muit_yAxis = props.muit_yAxis;
|
|
45
46
|
var _useState = useState({}),
|
|
46
47
|
_useState2 = _slicedToArray(_useState, 2),
|
|
47
48
|
chartOption = _useState2[0],
|
|
@@ -109,10 +110,10 @@ var BizChart = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
109
110
|
if (type === 'pie') {
|
|
110
111
|
var rData = formatPieData(data, showAll, showList, props.showOther);
|
|
111
112
|
eOption = getPieOption(rData, legendPosition, legendOrient, props.showLabel, props.radius, props.center, tooltipFormatter);
|
|
112
|
-
} else if (type === 'line' || type === 'bar' || type === 'line_bar') {
|
|
113
|
-
var _rData = formatChartData(data, showAll, showList, reverseXAxis, colors, type === 'line_bar');
|
|
114
|
-
eOption = getChartOption(type, _rData, legendPosition, legendOrient, valueUnit, xRotate, yRotate, tooltipFormatter, xAxisFormatter, yAxisFormatter, legendFormatter, reverseXAxis, seriesName, isHideLegend, tooltipTrigger);
|
|
115
|
-
if (type === 'line_bar') {
|
|
113
|
+
} else if (type === 'line' || type === 'bar' || type === 'line_bar' || type === 'muit_y') {
|
|
114
|
+
var _rData = formatChartData(data, showAll, showList, reverseXAxis, colors, type === 'line_bar' || type === 'muit_y');
|
|
115
|
+
eOption = getChartOption(type, _rData, legendPosition, legendOrient, valueUnit, xRotate, yRotate, tooltipFormatter, xAxisFormatter, yAxisFormatter, legendFormatter, reverseXAxis, seriesName, isHideLegend, tooltipTrigger, muit_yAxis);
|
|
116
|
+
if (type === 'line_bar' || type === 'muit_y') {
|
|
116
117
|
eOption.grid.right = '1%';
|
|
117
118
|
eOption.grid.left = '1%';
|
|
118
119
|
}
|
package/es/chart/types.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare namespace ChartTypes {
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
interface Props {
|
|
31
|
-
type?: 'bar' | 'pie' | 'line' | 'map' | 'line_bar';
|
|
31
|
+
type?: 'bar' | 'pie' | 'line' | 'map' | 'line_bar' | 'muit_y';
|
|
32
32
|
data?: Value;
|
|
33
33
|
option?: EChartsOption;
|
|
34
34
|
isCity?: boolean;
|
|
@@ -54,5 +54,6 @@ export declare namespace ChartTypes {
|
|
|
54
54
|
autoHeight?: boolean;
|
|
55
55
|
isHideLegend?: boolean;
|
|
56
56
|
tooltipTrigger?: string;
|
|
57
|
+
muit_yAxis?: {}[];
|
|
57
58
|
}
|
|
58
59
|
}
|
|
@@ -10,7 +10,9 @@ 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 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
|
|
13
|
+
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
|
+
name?: string;
|
|
15
|
+
}[]) => EChartsOption;
|
|
14
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;
|
|
15
17
|
export declare const getMapOption: (seriesData: object[] | undefined, maxMinValue: {
|
|
16
18
|
min: number;
|
|
@@ -124,6 +124,7 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
124
124
|
var seriesName = arguments.length > 12 ? arguments[12] : undefined;
|
|
125
125
|
var isHideLegend = arguments.length > 13 ? arguments[13] : undefined;
|
|
126
126
|
var tooltipTrigger = arguments.length > 14 ? arguments[14] : undefined;
|
|
127
|
+
var muit_yAxis = arguments.length > 15 ? arguments[15] : undefined;
|
|
127
128
|
var xAxis = JSON.parse(JSON.stringify(xAxisConfig)),
|
|
128
129
|
tooltip = JSON.parse(JSON.stringify(tooltipConfig)),
|
|
129
130
|
yAxis = _objectSpread({}, yAxisConfig),
|
|
@@ -136,7 +137,7 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
136
137
|
if (data.xAxis) {
|
|
137
138
|
xAxis.data = data.xAxis;
|
|
138
139
|
}
|
|
139
|
-
xAxis.boundaryGap = chartType === 'bar' || chartType === 'line_bar';
|
|
140
|
+
xAxis.boundaryGap = chartType === 'bar' || chartType === 'line_bar' || chartType === 'muit_y';
|
|
140
141
|
xAxis.axisLabel = xAxis.axisLabel || {
|
|
141
142
|
rotate: 0
|
|
142
143
|
};
|
|
@@ -155,7 +156,7 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
155
156
|
return yAxisFormatterDefault(value, unit);
|
|
156
157
|
};
|
|
157
158
|
}
|
|
158
|
-
if (chartType === 'line_bar') {
|
|
159
|
+
if (chartType === 'line_bar' || chartType === 'muit_y') {
|
|
159
160
|
yAxis.alignTicks = true;
|
|
160
161
|
yAxis.minInterval = 1;
|
|
161
162
|
}
|
|
@@ -165,24 +166,30 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
165
166
|
}
|
|
166
167
|
if (!reverseXAxis) {
|
|
167
168
|
series = data.series.map(function (item) {
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
console.log('item', item);
|
|
170
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, item), seriesItem), {}, {
|
|
171
|
+
type: chartType === 'line_bar' || chartType === 'muit_y' ? item.type : chartType
|
|
170
172
|
}, chartType === 'line_bar' ? {
|
|
171
173
|
yAxisIndex: item.type === 'line' ? 1 : 0
|
|
174
|
+
} : {}), chartType === 'muit_y' ? {
|
|
175
|
+
yAxisIndex: item.yAxisIndex
|
|
172
176
|
} : {});
|
|
173
177
|
});
|
|
174
178
|
} else {
|
|
175
|
-
|
|
179
|
+
console.log('seriesItem', seriesItem);
|
|
180
|
+
series = [_objectSpread(_objectSpread(_objectSpread({
|
|
176
181
|
name: seriesName || '',
|
|
177
182
|
data: data.series
|
|
178
183
|
}, seriesItem), {}, {
|
|
179
|
-
type: chartType === 'line_bar' ? seriesItem.type : chartType
|
|
184
|
+
type: chartType === 'line_bar' || chartType === 'muit_y' ? seriesItem.type : chartType
|
|
180
185
|
}, chartType === 'line_bar' ? {
|
|
181
186
|
yAxisIndex: seriesItem.type === 'line' ? 1 : 0
|
|
187
|
+
} : {}), chartType === 'muit_y' ? {
|
|
188
|
+
yAxisIndex: seriesItem.yAxisIndex
|
|
182
189
|
} : {})];
|
|
183
190
|
}
|
|
184
191
|
tooltip.axisPointer = tooltip.axisPointer || {};
|
|
185
|
-
tooltip.axisPointer.type = chartType === 'bar' || chartType === 'line_bar' ? 'shadow' : 'line';
|
|
192
|
+
tooltip.axisPointer.type = chartType === 'bar' || chartType === 'line_bar' || chartType === 'muit_y' ? 'shadow' : 'line';
|
|
186
193
|
tooltip.formatter = function (params) {
|
|
187
194
|
return tooltipFormatter ? tooltipFormatter(params) : tooltip.trigger === 'item' ? tooltipFormatterItemDefault(params, data.resultFormatMap, unit) : tooltipFormatterDefault(params, data.resultFormatMap, unit);
|
|
188
195
|
};
|
|
@@ -202,11 +209,20 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
202
209
|
legend.width = 50;
|
|
203
210
|
grid.left = '10%';
|
|
204
211
|
}
|
|
205
|
-
if (chartType === 'line') {
|
|
212
|
+
if (chartType === 'line' || chartType === 'muit_y') {
|
|
206
213
|
legend.icon = 'circle';
|
|
207
214
|
}
|
|
208
215
|
legend.formatter = legendFormatter ? legendFormatter : legendFormatterDefault;
|
|
209
216
|
var dealyAxis = chartType === 'line_bar' ? [yAxis, yAxis] : yAxis;
|
|
217
|
+
console.log('yAxis', yAxis, grid);
|
|
218
|
+
if (chartType === 'muit_y' && muit_yAxis) {
|
|
219
|
+
dealyAxis = muit_yAxis === null || muit_yAxis === void 0 ? void 0 : muit_yAxis.map(function (item) {
|
|
220
|
+
if (item && item.name) {
|
|
221
|
+
grid.top = 45;
|
|
222
|
+
}
|
|
223
|
+
return _objectSpread(_objectSpread({}, yAxis), item);
|
|
224
|
+
});
|
|
225
|
+
}
|
|
210
226
|
return _objectSpread(_objectSpread({}, baseConfig), {}, {
|
|
211
227
|
legend: legend,
|
|
212
228
|
xAxis: xAxis,
|
|
@@ -70,7 +70,8 @@ export var formatChartData = function formatChartData(data, showAll, showList, r
|
|
|
70
70
|
}, seriesItem.stack ? {
|
|
71
71
|
stack: seriesItem.stack
|
|
72
72
|
} : {}), {}, {
|
|
73
|
-
type: isUseSelf ? seriesItem.type : undefined
|
|
73
|
+
type: isUseSelf ? seriesItem.type : undefined,
|
|
74
|
+
yAxisIndex: isUseSelf ? seriesItem.yAxisIndex : undefined
|
|
74
75
|
}));
|
|
75
76
|
}
|
|
76
77
|
}
|
package/es/select/handle.js
CHANGED
|
@@ -103,7 +103,7 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
103
103
|
if (props.multiple) {
|
|
104
104
|
return /*#__PURE__*/React.createElement("div", {
|
|
105
105
|
ref: handleRef,
|
|
106
|
-
className: "".concat(classPrefix, "-input ").concat(classPrefix, "-input-multiple\n ").concat(props.theme ? props.theme : '', " ").concat(props.disable ? 'disable' : '', "\n ").concat(mergedStatus ? "".concat(classPrefix, "-status-").concat(mergedStatus) : '', "\n ").concat(focus ? 'active' : '', " ").concat(border ? '' : 'borderless', " ").concat(props.size ? props.size : '')
|
|
106
|
+
className: "".concat(classPrefix, "-input ").concat(classPrefix, "-input-multiple\n ").concat(props.theme ? props.theme : '', " ").concat(props.disable ? 'disable' : '', " \n ").concat(mergedStatus ? "".concat(classPrefix, "-status-").concat(mergedStatus) : '', "\n ").concat(focus ? 'active' : '', " ").concat(border ? '' : 'borderless', " ").concat(props.size ? props.size : '')
|
|
107
107
|
}, /*#__PURE__*/React.createElement("div", {
|
|
108
108
|
className: "".concat(classPrefix, "-multiple-content")
|
|
109
109
|
}, props.value && props.value.length > 0 ? props.value.map(function (item, index) {
|
|
@@ -146,7 +146,7 @@ var SelectHandle = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
146
146
|
var optionData = props.value && props.value;
|
|
147
147
|
return /*#__PURE__*/React.createElement("div", {
|
|
148
148
|
ref: handleRef,
|
|
149
|
-
className: "".concat(classPrefix, "-input ").concat(props.theme ? props.theme : '', "\n ").concat(props.disable ? 'disable' : '', " ").concat(focus ? 'active' : '', "\n ").concat(mergedStatus ? "".concat(classPrefix, "-status-").concat(mergedStatus) : '', "\n ").concat(border ? '' : 'borderless', " ").concat(props.size ? props.size : 'middle'),
|
|
149
|
+
className: "".concat(classPrefix, "-input ").concat(props.theme ? props.theme : '', "\n ").concat(props.disable ? 'disable' : '', " ").concat(focus ? 'active' : '', " \n ").concat(mergedStatus ? "".concat(classPrefix, "-status-").concat(mergedStatus) : '', "\n ").concat(border ? '' : 'borderless', " ").concat(props.size ? props.size : 'middle'),
|
|
150
150
|
title: "".concat(props.label || (optionData === null || optionData === void 0 ? void 0 : optionData[aliasField || '']) || (optionData === null || optionData === void 0 ? void 0 : optionData[labelField]) || '').concat(extraLabel)
|
|
151
151
|
}, /*#__PURE__*/React.createElement("span", {
|
|
152
152
|
className: "".concat(classPrefix, "-content")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.31",
|
|
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": "633baf122e8b6be641cc5d49360ba49845fbd7aa",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|