Changed
One chart library: Apache ECharts. Before this version, six charts
were drawn by hand in SVG and the other chart types used ApexCharts. Now every chart
uses ECharts. The props of Line, Spark, Ring,
Bars, Dial, Gauge and Chart did
not change, so your pages need no changes.
-
The thermostat dial is now a real ECharts gauge, with ticks,
labels, a sweeping needle and a counting value.
-
Charts have tooltips. Hover a chart with axes to see each series
and its value.
-
Long axis labels are shortened with an ellipsis instead of being
cut off.
-
Theme changes still recolor a chart in place, without replaying its
entrance.
Fixed
- A second dial on the same page used the colors of the first dial.
-
Chart axis labels moved into the chart in right-to-left mode. Charts now always draw
from left to right, and their tooltips follow the page direction.
Improved
-
Smaller downloads. The chart code is now about 200 KB after
compression, down from about 255 KB, and the rarer chart types load only on pages
that use them.
Files
changed
-
src/components/charts/: every file, plus the new
echarts.ts and useChart.ts
src/lib/theme.ts and src/main.tsx
src/pages/ui/Charts.tsx and src/pages/ui/Motion.tsx
src/styles/components.css
vite.config.ts and eslint.config.js
-
package.json and package-lock.json: added
echarts, removed apexcharts
How
to update
Run npm install after you copy the new package.json and
package-lock.json.