@chenkai_ioc/react-charts
v0.1.5
Published
Reusable React chart and dashboard components built with ECharts.
Readme
@chenkai_ioc/react-charts
All reusable components from this repository's src/components/Chart directory,
published as a React component library.
Install
pnpm add @chenkai_ioc/react-charts echarts echarts-gl echarts-for-react antd @ant-design/icons ahooks classnamesThe package supports React 18 and React 19. Its UI and chart dependencies are peer dependencies, so the consuming application retains one shared copy of each library.
Use
import { Bar, Gauge, Pie3D, StyleEleven } from '@chenkai_ioc/react-charts';
import '@chenkai_ioc/react-charts/style.css';
export function Dashboard() {
return <Bar />;
}Every Chart subdirectory is exported under its directory name. Component props and other public TypeScript types are also exported.
Rendering environment
This is a browser-focused component library. In SSR frameworks, render chart
components on the client only; the 3D charts register echarts-gl, which requires
a browser global.
Publish
For the one-command Windows publishing workflow, see PUBLISH.md.
cd packages/react-charts
pnpm run build
npm publish --access publicPublishing requires an npm account that has permission to publish packages in the
@ioc scope. npm publish runs the package build automatically through prepack.
