@particle-academy/fancy-echarts 3.0.2 → 4.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 +11 -1
- package/dist/index.cjs +37 -2340
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -247
- package/dist/index.d.ts +2 -247
- package/dist/index.js +39 -2043
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/diagram.serializers-DSYRR3LI.js +0 -277
- package/dist/diagram.serializers-DSYRR3LI.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @particle-academy/fancy-echarts
|
|
2
2
|
|
|
3
|
-
React
|
|
3
|
+
Typed React wrapper around [Apache ECharts](https://echarts.apache.org/) — every chart type from a single `<EChart>` component, lazy module registration, four built-in themes.
|
|
4
|
+
|
|
5
|
+
> **Breaking change in 4.0** — the hand-rolled diagram subsystem (`<Diagram>`, `<DataDiagram>`, `<OrgChart>`, `<Mindmap>`, `<Flowchart>` and their types) is removed. ECharts and react-flow each own their domain: charts here, node-edge graphs in [`@particle-academy/fancy-flow`](https://github.com/Particle-Academy/fancy-flow). If you used the diagram presets, migrate to fancy-flow — its `<FlowEditor>` + `defineNode` + `<NodePort>` covers org charts, flowcharts, ERDs, and mindmaps cleanly. Real Sankey / sunburst / radial visualizations stay here as proper ECharts series.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
@@ -29,6 +31,14 @@ npm install echarts-gl
|
|
|
29
31
|
|
|
30
32
|
## Quick Start
|
|
31
33
|
|
|
34
|
+
> **Registration is module-scoped per bundle entry.** Call `registerAll()` (or
|
|
35
|
+
> `registerCharts(...)`) once in **every** independent bundle entry that renders
|
|
36
|
+
> charts — a second entry (e.g. a separate Vite/Inertia entry) that doesn't run
|
|
37
|
+
> the first entry's code won't have registered anything. If a chart/component
|
|
38
|
+
> type isn't registered, `<EChart>` now throws a clear
|
|
39
|
+
> `[fancy-echarts] … is likely not registered. Call registerAll()…` error
|
|
40
|
+
> (instead of echarts' cryptic `_u[o] is not a constructor`).
|
|
41
|
+
|
|
32
42
|
```tsx
|
|
33
43
|
import { EChart, registerAll } from "@particle-academy/fancy-echarts";
|
|
34
44
|
|