@lobehub/charts 6.0.0 → 6.0.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 +80 -69
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
<h1>Lobe Charts</h1>
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
<h3>Charts for Dashboards and Model Leaderboards</h3>
|
|
12
|
+
|
|
13
|
+
Beautiful React charts for dashboards and AI benchmarks, themed with Lobe UI.
|
|
12
14
|
|
|
13
15
|
[Documents](https://charts.lobehub.com) · [Changelog](./CHANGELOG.md) · [Report Bug][github-issues-link] · [Request Feature][github-issues-link]
|
|
14
16
|
|
|
@@ -36,35 +38,30 @@ React modern charts components built on recharts
|
|
|
36
38
|
|
|
37
39
|
#### TOC
|
|
38
40
|
|
|
39
|
-
- [
|
|
40
|
-
- [
|
|
41
|
-
|
|
41
|
+
- [💡 Why Lobe Charts?](#-why-lobe-charts)
|
|
42
|
+
- [🚀 Getting Started](#-getting-started)
|
|
43
|
+
- [🤖 AI-Powered Development](#-ai-powered-development)
|
|
44
|
+
- [📖 Documentation](#-documentation)
|
|
42
45
|
- [⌨️ Local Development](#️-local-development)
|
|
43
46
|
- [🤝 Contributing](#-contributing)
|
|
44
47
|
- [🩷 Sponsor](#-sponsor)
|
|
45
48
|
- [🔗 Links](#-links)
|
|
46
49
|
- [Credits](#credits)
|
|
47
|
-
- [More Products](#more-products)
|
|
48
|
-
- [Design Resources](#design-resources)
|
|
49
|
-
- [Development Resources](#development-resources)
|
|
50
50
|
|
|
51
51
|
####
|
|
52
52
|
|
|
53
53
|
</details>
|
|
54
54
|
|
|
55
|
-
##
|
|
55
|
+
## 💡 Why Lobe Charts?
|
|
56
|
+
|
|
57
|
+
Lobe Charts (`@lobehub/charts`) is a React chart library for dashboards and AI products, built on [recharts](https://github.com/recharts/recharts) and designed to fit [Lobe UI](https://github.com/lobehub/lobe-ui) apps.
|
|
56
58
|
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
- [
|
|
63
|
-
- [x] Spark Chart
|
|
64
|
-
- [x] Heatmaps
|
|
65
|
-
- [x] Data List
|
|
66
|
-
- [x] Tracker
|
|
67
|
-
- [x] Legend
|
|
59
|
+
- **Everything a dashboard needs** - business charts, sparklines, heatmaps and status trackers in one package
|
|
60
|
+
- **Made for AI products** - ready-made charts for model benchmarks and leaderboards, with your own brand icons
|
|
61
|
+
- **Fits your Lobe UI app** - charts follow the Lobe UI theme, so they look consistent without extra styling
|
|
62
|
+
- **Simple, data-first props** - pass an array of objects and choose which keys to plot
|
|
63
|
+
- **Fully typed** - TypeScript types for every component
|
|
64
|
+
- **Agent-ready** - coding agents can learn the library from [`skills.md`][skills-md-link] and [`llms.txt`][llms-txt-link]
|
|
68
65
|
|
|
69
66
|
<div align="right">
|
|
70
67
|
|
|
@@ -72,46 +69,75 @@ React modern charts components built on recharts
|
|
|
72
69
|
|
|
73
70
|
</div>
|
|
74
71
|
|
|
75
|
-
##
|
|
72
|
+
## 🚀 Getting Started
|
|
76
73
|
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
```bash
|
|
75
|
+
$ bun add @lobehub/charts
|
|
76
|
+
```
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
`@lobehub/ui` (v6), `react` and `react-dom` (v19) are peer dependencies; install them too if your project does not have them yet. The package is [ESM only](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
```tsx
|
|
81
|
+
import { LineChart } from '@lobehub/charts';
|
|
83
82
|
|
|
84
|
-
|
|
85
|
-
|
|
83
|
+
const data = [
|
|
84
|
+
{ date: 'Jan 22', Inverters: 2338, SolarPanels: 2890 },
|
|
85
|
+
{ date: 'Feb 22', Inverters: 2103, SolarPanels: 2756 },
|
|
86
|
+
{ date: 'Mar 22', Inverters: 2194, SolarPanels: 3322 },
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
// `index` is the x-axis key, `categories` are the series to plot
|
|
90
|
+
export default () => (
|
|
91
|
+
<LineChart categories={['SolarPanels', 'Inverters']} data={data} index="date" />
|
|
92
|
+
);
|
|
86
93
|
```
|
|
87
94
|
|
|
88
|
-
|
|
95
|
+
See the [documents](https://charts.lobehub.com) for every component, live demos and props.
|
|
89
96
|
|
|
90
|
-
>
|
|
91
|
-
|
|
97
|
+
<div align="right">
|
|
98
|
+
|
|
99
|
+
[![][back-to-top]](#readme-top)
|
|
100
|
+
|
|
101
|
+
</div>
|
|
92
102
|
|
|
93
|
-
|
|
94
|
-
// next.config.js
|
|
95
|
-
const nextConfig = {
|
|
96
|
-
// ...other config
|
|
103
|
+
## 🤖 AI-Powered Development
|
|
97
104
|
|
|
98
|
-
|
|
99
|
-
|
|
105
|
+
Lobe Charts publishes agent-readable docs, generated from the same source as the documentation site.
|
|
106
|
+
|
|
107
|
+
| Resource | What it is | How to use it |
|
|
108
|
+
| ---------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
109
|
+
| **Agent Skill** - [`skills.md`][skills-md-link] | Skill entry point: setup, a recommended workflow and an index of every component page | Give the URL to your agent (Cursor, Claude Code, Codex, ...), or save it as a `SKILL.md` in your agent's skills folder |
|
|
110
|
+
| **llms.txt** - [`llms.txt`][llms-txt-link] | [llms.txt](https://llmstxt.org/) index of every docs page | Point any llms.txt-aware tool at it |
|
|
111
|
+
| **Component reference** - `https://charts.lobehub.com/skills/components/<name>.md` | Markdown page for one component, e.g. [`line-chart.md`](https://charts.lobehub.com/skills/components/line-chart.md) | Fetch it before writing code with that component |
|
|
112
|
+
|
|
113
|
+
Works with **Cursor**, **Claude Code**, **Codex**, **Windsurf**, **GitHub Copilot** and any tool that can read a URL or `llms.txt`. Copy-paste prompt:
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
Use @lobehub/charts. Read https://charts.lobehub.com/skills.md first,
|
|
117
|
+
then fetch the reference page of each component you use before writing code.
|
|
100
118
|
```
|
|
101
119
|
|
|
120
|
+
> \[!NOTE]\
|
|
121
|
+
> There is no MCP server or skill install CLI yet; `skills.md` and `llms.txt` are the agent entry points.
|
|
122
|
+
|
|
102
123
|
<div align="right">
|
|
103
124
|
|
|
104
125
|
[![][back-to-top]](#readme-top)
|
|
105
126
|
|
|
106
127
|
</div>
|
|
107
128
|
|
|
108
|
-
##
|
|
129
|
+
## 📖 Documentation
|
|
109
130
|
|
|
110
|
-
|
|
131
|
+
- **Docs & live demos**: [charts.lobehub.com](https://charts.lobehub.com) - line, area, bar, composed, donut / pie, funnel, scatter, radar, sparklines, heatmaps, trackers, benchmark charts and more
|
|
132
|
+
- **Changelog**: [CHANGELOG.md](./CHANGELOG.md)
|
|
111
133
|
|
|
112
|
-
|
|
134
|
+
<div align="right">
|
|
113
135
|
|
|
114
|
-
|
|
136
|
+
[![][back-to-top]](#readme-top)
|
|
137
|
+
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
## ⌨️ Local Development
|
|
115
141
|
|
|
116
142
|
```bash
|
|
117
143
|
$ git clone https://github.com/lobehub/lobe-charts.git
|
|
@@ -159,31 +185,20 @@ Every bit counts and your one-time donation sparkles in our galaxy of support! Y
|
|
|
159
185
|
|
|
160
186
|
## 🔗 Links
|
|
161
187
|
|
|
188
|
+
- **[🤯 Lobe UI](https://github.com/lobehub/lobe-ui)** - React component library for AI applications
|
|
189
|
+
- **[🌈 Lobe Icons](https://github.com/lobehub/lobe-icons)** - AI / LLM brand logo and icon library
|
|
190
|
+
- **[📊 Lobe Charts](https://github.com/lobehub/lobe-charts)** - React chart component library
|
|
191
|
+
- **[✒️ Lobe Editor](https://github.com/lobehub/lobe-editor)** - Lexical-based rich text editor for React, with Markdown, plugins and a chat composer
|
|
192
|
+
- **[🗣️ Lobe TTS](https://github.com/lobehub/lobe-tts)** - TTS / STT speech library
|
|
193
|
+
- **[📐 Lobe Lint](https://github.com/lobehub/lobe-lint)** - ESLint, Prettier, Stylelint, Commitlint and more lint configs
|
|
194
|
+
- **[😊 Fluent Emoji](https://github.com/lobehub/fluent-emoji)** - Fluent Emoji asset library
|
|
195
|
+
|
|
162
196
|
### Credits
|
|
163
197
|
|
|
164
198
|
- **recharts** - <https://github.com/recharts/recharts>
|
|
165
199
|
- **tremor** - <https://github.com/tremorlabs/tremor>
|
|
166
200
|
- **react-activity-calendar** - <https://github.com/grubersjoe/react-activity-calendar>
|
|
167
201
|
|
|
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
|
-
|
|
187
202
|
<div align="right">
|
|
188
203
|
|
|
189
204
|
[![][back-to-top]](#readme-top)
|
|
@@ -194,7 +209,7 @@ Every bit counts and your one-time donation sparkles in our galaxy of support! Y
|
|
|
194
209
|
|
|
195
210
|
<details><summary><h4>📝 License</h4></summary>
|
|
196
211
|
|
|
197
|
-
[![][
|
|
212
|
+
[![][github-license-shield]][github-license-link]
|
|
198
213
|
|
|
199
214
|
</details>
|
|
200
215
|
|
|
@@ -204,19 +219,13 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
204
219
|
<!-- LINK GROUP -->
|
|
205
220
|
|
|
206
221
|
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
|
|
207
|
-
[bun-link]: https://bun.sh
|
|
208
|
-
[bun-shield]: https://img.shields.io/badge/-speedup%20with%20bun-black?logo=bun&style=for-the-badge
|
|
209
|
-
[codespaces-link]: https://codespaces.new/lobehub/lobe-charts
|
|
210
|
-
[codespaces-shield]: https://github.com/codespaces/badge.svg
|
|
211
222
|
[contributors-contrib]: https://contrib.rocks/image?repo=lobehub/lobe-charts
|
|
212
223
|
[contributors-link]: https://github.com/lobehub/lobe-charts/graphs/contributors
|
|
213
224
|
[discord-link]: https://discord.gg/AYFPHvv2jT
|
|
214
225
|
[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
|
|
215
|
-
[
|
|
216
|
-
[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-charts.svg?type=large
|
|
217
|
-
[github-action-release-link]: https://github.com/actions/workflows/lobehub/lobe-charts/release.yml
|
|
226
|
+
[github-action-release-link]: https://github.com/lobehub/lobe-charts/actions/workflows/release.yml
|
|
218
227
|
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-charts/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
219
|
-
[github-action-test-link]: https://github.com/
|
|
228
|
+
[github-action-test-link]: https://github.com/lobehub/lobe-charts/actions/workflows/test.yml
|
|
220
229
|
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-charts/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
|
221
230
|
[github-contributors-link]: https://github.com/lobehub/lobe-charts/graphs/contributors
|
|
222
231
|
[github-contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-charts?color=c4f042&labelColor=black&style=flat-square
|
|
@@ -230,12 +239,14 @@ This project is [MIT](./LICENSE) licensed.
|
|
|
230
239
|
[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-charts?labelColor=black&style=flat-square
|
|
231
240
|
[github-stars-link]: https://github.com/lobehub/lobe-charts/network/stargazers
|
|
232
241
|
[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-charts?color=ffcb47&labelColor=black&style=flat-square
|
|
242
|
+
[llms-txt-link]: https://charts.lobehub.com/llms.txt
|
|
233
243
|
[npm-downloads-link]: https://www.npmjs.com/package/@lobehub/charts
|
|
234
244
|
[npm-downloads-shield]: https://img.shields.io/npm/dt/@lobehub/charts?labelColor=black&style=flat-square
|
|
235
245
|
[npm-release-link]: https://www.npmjs.com/package/@lobehub/charts
|
|
236
246
|
[npm-release-shield]: https://img.shields.io/npm/v/@lobehub/charts?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
|
237
|
-
[pr-welcome-link]: https://github.com/lobehub/lobe-
|
|
247
|
+
[pr-welcome-link]: https://github.com/lobehub/lobe-charts/pulls
|
|
238
248
|
[pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge
|
|
239
249
|
[profile-link]: https://github.com/lobehub
|
|
250
|
+
[skills-md-link]: https://charts.lobehub.com/skills.md
|
|
240
251
|
[vercel-link]: https://charts.lobehub.com
|
|
241
|
-
[vercel-shield]: https://img.shields.io/website?down_message=offline&label=vercel&labelColor=black&logo=vercel&style=flat-square&up_message=online&url=https%3A%2F%
|
|
252
|
+
[vercel-shield]: https://img.shields.io/website?down_message=offline&label=vercel&labelColor=black&logo=vercel&style=flat-square&up_message=online&url=https%3A%2F%2Fcharts.lobehub.com
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/charts",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"description": "React modern charts components built on recharts",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lobehub",
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
"dayjs": "^1.11.23",
|
|
131
131
|
"fast-deep-equal": "^3.1.3",
|
|
132
132
|
"lucide-react": "^0.562.0",
|
|
133
|
+
"polished": "^4.3.1",
|
|
133
134
|
"recharts": "^2.15.4"
|
|
134
135
|
},
|
|
135
136
|
"devDependencies": {
|
|
@@ -154,7 +155,6 @@
|
|
|
154
155
|
"husky": "^9.1.7",
|
|
155
156
|
"jsdom": "^27.4.0",
|
|
156
157
|
"lint-staged": "^16.4.0",
|
|
157
|
-
"polished": "^4.3.1",
|
|
158
158
|
"prettier": "^3.9.8",
|
|
159
159
|
"react": "^19.3.0",
|
|
160
160
|
"react-dom": "^19.3.0",
|