Installation
This guide will walk you through installing expo-skia-charts and its dependencies.
Prerequisites
Before installing, ensure your environment meets these requirements:
Install the Package
Install expo-skia-charts and its peer dependencies:
npx expo install expo-skia-charts @shopify/react-native-skia react-native-reanimated react-native-gesture-handler
Web
Verify Installation
Create a simple chart to verify everything is working:
import { View } from "react-native";
import { LineChart } from "expo-skia-charts";
export default function App() {
const data = [
{ x: 1, y: 10 },
{ x: 2, y: 25 },
{ x: 3, y: 15 },
];
return (
<View style={{ flex: 1, padding: 16 }}>
<View style={{ height: 300 }}>
<LineChart config={{ data }} />
</View>
</View>
);
}
If you see a line chart, you're all set!