Quickstart
Start using react-native-chart-kit with a basic setup.
React Native CLI
npm install react-native-chart-kit react-native-svgFor iOS apps, install native pods after installing dependencies:
cd iospod installExpo
Install the package and the Expo-compatible react-native-svg version:
npm install react-native-chart-kitnpx expo install react-native-svgFirst Modern Chart
New screens can import the modern v2 API from the public package subpath.
import { LineChart } from "react-native-chart-kit/v2";
const data = [
{ month: "Jan", revenue: 52 },
{ month: "Feb", revenue: 86 },
{ month: "Mar", revenue: 58 },
{ month: "Apr", revenue: 134 },
{ month: "May", revenue: 95 },
{ month: "Jun", revenue: 176 }
];
export function RevenueChart() {
return (
<LineChart
data={data}
xKey="month"
yKey="revenue"
width={410}
height={240}
/>
);
}The root import remains the legacy-compatible surface for existing screens.
For Pro charts, see Pro chart installation.