@zgfe/business-lib 1.2.9-session.0 → 1.2.10-session.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.
|
@@ -146,10 +146,9 @@ export var getChartOption = function getChartOption(chartType, data) {
|
|
|
146
146
|
if (yAxisFormatter) {
|
|
147
147
|
yAxis.axisLabel.formatter = yAxisFormatter;
|
|
148
148
|
} else {
|
|
149
|
-
yAxis.axisLabel.formatter =
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
yAxis.name = unit;
|
|
149
|
+
yAxis.axisLabel.formatter = function (value) {
|
|
150
|
+
return yAxisFormatterDefault(value, unit);
|
|
151
|
+
};
|
|
153
152
|
}
|
|
154
153
|
if (chartType === 'line_bar') {
|
|
155
154
|
yAxis.alignTicks = true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
declare const tooltipFormatterDefault: (params: any, resultFormatMap?: {
|
|
2
2
|
[key: string]: string;
|
|
3
3
|
} | undefined, unit?: string) => string;
|
|
4
|
-
declare const yAxisFormatterDefault: (value: number) => string;
|
|
4
|
+
declare const yAxisFormatterDefault: (value: number, unit?: string) => string;
|
|
5
5
|
declare const xAxisFormatterDefault: (value: string) => string;
|
|
6
6
|
declare const mapTooltipFormatter: (params: any) => string | undefined;
|
|
7
7
|
declare const legendFormatterDefault: (label: string) => string;
|
|
@@ -25,6 +25,8 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params, resultFor
|
|
|
25
25
|
lineLabel += '%';
|
|
26
26
|
} else if (resultFormatMap && resultFormatMap[item.seriesName] && /percent/.test(resultFormatMap[item.seriesName])) {
|
|
27
27
|
lineLabel = util.toThousands(lineLabel) + '%';
|
|
28
|
+
} else if (unit && unit === 'time') {
|
|
29
|
+
lineLabel = util.timeFormat(lineLabel, 'hhhmmmsss', 1);
|
|
28
30
|
} else {
|
|
29
31
|
lineLabel = util.toThousands(lineLabel) + (unit || '');
|
|
30
32
|
}
|
|
@@ -39,8 +41,12 @@ var tooltipFormatterDefault = function tooltipFormatterDefault(params, resultFor
|
|
|
39
41
|
});
|
|
40
42
|
return htmlArray.join('');
|
|
41
43
|
};
|
|
42
|
-
var yAxisFormatterDefault = function yAxisFormatterDefault(value) {
|
|
43
|
-
if (
|
|
44
|
+
var yAxisFormatterDefault = function yAxisFormatterDefault(value, unit) {
|
|
45
|
+
if (unit && unit === '%') {
|
|
46
|
+
return value + '%';
|
|
47
|
+
} else if (unit && unit === 'time') {
|
|
48
|
+
return util.timeFormat(value, 'hhhmmmsss', 1);
|
|
49
|
+
} else if (parseFloat(String(value)) >= 1000) {
|
|
44
50
|
return util.toThousands(parseFloat((value / 1000).toFixed(1))) + 'k';
|
|
45
51
|
} else {
|
|
46
52
|
return String(value);
|
package/es/datePicker/index.js
CHANGED
|
@@ -72,15 +72,14 @@ var BizDatePicker = function BizDatePicker(_ref) {
|
|
|
72
72
|
return item.value === initValue.unit;
|
|
73
73
|
}) : list[0];
|
|
74
74
|
setCurrentType(currentType);
|
|
75
|
-
if (
|
|
75
|
+
if (initValue === null || initValue === void 0 ? void 0 : initValue.relative) {
|
|
76
|
+
setRelative(initValue.relative);
|
|
77
|
+
} else if ((initValue === null || initValue === void 0 ? void 0 : initValue.begin) && (initValue === null || initValue === void 0 ? void 0 : initValue.end)) {
|
|
76
78
|
setDateRange({
|
|
77
79
|
begin: initValue.begin,
|
|
78
80
|
end: initValue.end
|
|
79
81
|
});
|
|
80
82
|
}
|
|
81
|
-
if (initValue === null || initValue === void 0 ? void 0 : initValue.relative) {
|
|
82
|
-
setRelative(initValue.relative);
|
|
83
|
-
}
|
|
84
83
|
setReady(true);
|
|
85
84
|
}
|
|
86
85
|
useEffect(function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10-session.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": "6d56b63269006a28fcc912282bd0d6b06a3f16a2",
|
|
59
59
|
"gitHooks": {
|
|
60
60
|
"pre-commit": "lint-staged"
|
|
61
61
|
}
|