@lobehub/charts 1.9.2 → 1.9.3
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/DonutChart/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { Flexbox } from 'react-layout-kit';
|
|
|
15
15
|
import { Pie, PieChart as ReChartsDonutChart, ResponsiveContainer, Tooltip } from 'recharts';
|
|
16
16
|
import NoData from "../common/NoData";
|
|
17
17
|
import { useThemeColorRange } from "../hooks/useThemeColorRange";
|
|
18
|
-
import { defaultValueFormatter } from "../utils";
|
|
18
|
+
import { defaultValueFormatter, isOnSeverSide } from "../utils";
|
|
19
19
|
import { DonutChartTooltip } from "./DonutChartTooltip";
|
|
20
20
|
import { parseLabelInput } from "./inputParser";
|
|
21
21
|
import { renderInactiveShape } from "./renderInactiveShape";
|
|
@@ -74,6 +74,7 @@ var DonutChart = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
74
74
|
setActiveIndex = _useState2[1];
|
|
75
75
|
var hasOnValueChange = !!onValueChange;
|
|
76
76
|
useEffect(function () {
|
|
77
|
+
if (isOnSeverSide) return;
|
|
77
78
|
var pieSectors = document.querySelectorAll('.recharts-pie-sector');
|
|
78
79
|
if (pieSectors) {
|
|
79
80
|
var _iterator = _createForOfIteratorHelper(pieSectors),
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
|
2
|
-
import { defaultValueFormatter } from "./index";
|
|
2
|
+
import { defaultValueFormatter, isOnSeverSide } from "./index";
|
|
3
3
|
export var getTextWidth = function getTextWidth(text) {
|
|
4
|
+
if (isOnSeverSide) return 0;
|
|
5
|
+
|
|
4
6
|
// 创建临时 span 元素
|
|
5
7
|
var span = document.createElement('span');
|
|
6
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/charts",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "React modern charts components built on recharts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"cross-env": "^7.0.3",
|
|
91
91
|
"dayjs": "^1.11.13",
|
|
92
92
|
"dumi": "^2.4.14",
|
|
93
|
-
"dumi-theme-lobehub": "^1.
|
|
93
|
+
"dumi-theme-lobehub": "^1.10.4",
|
|
94
94
|
"eslint": "^8.57.1",
|
|
95
95
|
"father": "^4.5.1",
|
|
96
96
|
"husky": "^9.1.7",
|