@lobehub/charts 1.9.2 → 1.9.4
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 +23 -13
- package/es/DonutChart/index.js +2 -1
- package/es/utils/getMaxLabelLength.js +3 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
React modern charts components built on recharts
|
|
12
12
|
|
|
13
|
-
[Changelog](./CHANGELOG.md) · [Report Bug][github-issues-link] · [Request Feature][github-issues-link]
|
|
13
|
+
[Documents](https://charts.lobehub.com) · [Changelog](./CHANGELOG.md) · [Report Bug][github-issues-link] · [Request Feature][github-issues-link]
|
|
14
14
|
|
|
15
15
|
<!-- SHIELD GROUP -->
|
|
16
16
|
|
|
@@ -43,8 +43,10 @@ React modern charts components built on recharts
|
|
|
43
43
|
- [🤝 Contributing](#-contributing)
|
|
44
44
|
- [🩷 Sponsor](#-sponsor)
|
|
45
45
|
- [🔗 Links](#-links)
|
|
46
|
-
- [More Products](#more-products)
|
|
47
46
|
- [Credits](#credits)
|
|
47
|
+
- [More Products](#more-products)
|
|
48
|
+
- [Design Resources](#design-resources)
|
|
49
|
+
- [Development Resources](#development-resources)
|
|
48
50
|
|
|
49
51
|
####
|
|
50
52
|
|
|
@@ -157,19 +159,31 @@ Every bit counts and your one-time donation sparkles in our galaxy of support! Y
|
|
|
157
159
|
|
|
158
160
|
## 🔗 Links
|
|
159
161
|
|
|
160
|
-
### More Products
|
|
161
|
-
|
|
162
|
-
- **[🤖 Lobe Chat][lobe-chat] :** An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application.
|
|
163
|
-
- **[🤯 Lobe Theme][lobe-theme] :** The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features.
|
|
164
|
-
- **[🌏 Lobe i18n][lobe-i18n] :** Lobe i18n is an automation tool for the i18n (internationalization) translation process, powered by ChatGPT. It supports features such as automatic splitting of large files, incremental updates, and customization options for the OpenAI model, API proxy, and temperature.
|
|
165
|
-
- **[💌 Lobe Commit][lobe-commit] :** Lobe Commit is a CLI tool that leverages Langchain/ChatGPT to generate Gitmoji-based commit messages.
|
|
166
|
-
|
|
167
162
|
### Credits
|
|
168
163
|
|
|
169
164
|
- **recharts** - <https://github.com/recharts/recharts>
|
|
170
165
|
- **tremor** - <https://github.com/tremorlabs/tremor>
|
|
171
166
|
- **react-activity-calendar** - <https://github.com/grubersjoe/react-activity-calendar>
|
|
172
167
|
|
|
168
|
+
### More Products
|
|
169
|
+
|
|
170
|
+
- **[🤯 Lobe Chat](https://github.com/lobehub/lobe-chat)** - An open-source, extensible (Function Calling), high-performance chatbot framework. It supports one-click free deployment of your private ChatGPT/LLM web application.
|
|
171
|
+
- **[🅰️ Lobe Theme](https://github.com/lobehub/sd-webui-lobe-theme)** - The modern theme for stable diffusion webui, exquisite interface design, highly customizable UI, and efficiency boosting features.
|
|
172
|
+
- **[🧸 Lobe Vidol](https://github.com/lobehub/lobe-vidol)** - Experience the magic of virtual idol creation with Lobe Vidol, enjoy the elegance of our Exquisite UI Design, dance along using MMD Dance Support, and engage in Smooth Conversations.
|
|
173
|
+
|
|
174
|
+
### Design Resources
|
|
175
|
+
|
|
176
|
+
- **[🍭 Lobe UI](https://ui.lobehub.com)** - An open-source UI component library for building AIGC web apps.
|
|
177
|
+
- **[🥨 Lobe Icons](https://lobehub.com/icons)** - Popular AI / LLM Model Brand SVG Logo and Icon Collection.
|
|
178
|
+
- **[📊 Lobe Charts](https://charts.lobehub.com)** - React modern charts components built on recharts
|
|
179
|
+
|
|
180
|
+
### Development Resources
|
|
181
|
+
|
|
182
|
+
- **[🎤 Lobe TTS](https://tts.lobehub.com)** - A high-quality & reliable TTS/STT library for Server and Browser
|
|
183
|
+
- **[🌏 Lobe i18n](https://github.com/lobehub/lobe-cli-toolbox/blob/master/packages/lobe-i18n)** - Automation ai tool for the i18n (internationalization) translation process.
|
|
184
|
+
|
|
185
|
+
[More Resources](https://lobehub.com/resources)
|
|
186
|
+
|
|
173
187
|
<div align="right">
|
|
174
188
|
|
|
175
189
|
[![][back-to-top]](#readme-top)
|
|
@@ -216,10 +230,6 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
216
230
|
[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-charts?labelColor=black&style=flat-square
|
|
217
231
|
[github-stars-link]: https://github.com/lobehub/lobe-charts/network/stargazers
|
|
218
232
|
[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-charts?color=ffcb47&labelColor=black&style=flat-square
|
|
219
|
-
[lobe-chat]: https://github.com/lobehub/lobe-chat
|
|
220
|
-
[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit
|
|
221
|
-
[lobe-i18n]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-i18n
|
|
222
|
-
[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme
|
|
223
233
|
[npm-downloads-link]: https://www.npmjs.com/package/@lobehub/charts
|
|
224
234
|
[npm-downloads-shield]: https://img.shields.io/npm/dt/@lobehub/charts?labelColor=black&style=flat-square
|
|
225
235
|
[npm-release-link]: https://www.npmjs.com/package/@lobehub/charts
|
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.4",
|
|
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",
|