Installation
react-klinecharts requires React 17, 18, or 19 and klinecharts v10.
Package manager
Section titled “Package manager”pnpm add react-klinechartsnpm install react-klinechartsyarn add react-klinechartsbun add react-klinechartsklinecharts is installed automatically as a regular dependency, so you don’t need to add it yourself. React and React DOM are peer dependencies — make sure they’re installed in your app:
pnpm add react react-domnpm install react react-domRequirements
Section titled “Requirements”| Package | Version |
|---|---|
react |
^17.0.0 || ^18.0.0 || ^19.0.0 |
react-dom |
^17.0.0 || ^18.0.0 || ^19.0.0 |
klinecharts |
^10.0.0 (bundled) |
| Node.js | >= 18 |
Verify the install
Section titled “Verify the install”import { KLineChart } from "react-klinecharts";
export default function App() { return ( <KLineChart data={[ { timestamp: 1, open: 1, high: 2, low: 0, close: 1.5, volume: 10 }, ]} style={{ width: "100%", height: 400 }} /> );}If you see a chart, you’re good to go. Continue to Quick Start.