Getting Started

Welcome to expo-skia-charts - Modern performant charts for iOS, Android, and Web using Skia.

Overview

expo-skia-charts is a React Native library that provides high-performance, interactive charts powered by @shopify/react-native-skia. Built for cross-platform compatibility, it delivers smooth 60fps animations on iOS, Android, and Web.

Features

    High Performance: Powered by Skia for native rendering performance
    Cross-Platform: Works on iOS, Android, and Web
    Smooth Animations: 60fps animations using react-native-reanimated
    Interactive: Built-in hover interactions and custom tooltips
    Customizable: Flexible styling and configuration options
    TypeScript: Full TypeScript support with detailed type definitions

Chart Types

Currently supported:
    LineChart: Single and multi-line charts with hover interactions, axes, and grid lines
    DonutChart: Interactive donut/pie charts with labels and values
More chart types coming soon!

Next Steps

Continue exploring the documentation to learn about:
    Installation - Detailed setup instructions
    API Reference - Complete API documentation
    Examples - Interactive chart examples
Try It Out!
Here's a simple interactive line chart showing the last 7 days. Try hovering over it or touching it to see the interaction.
import { LineChart } from "expo-skia-charts";

// Generate last 7 days of data with timestamps
const now = Date.now();
const oneDay = 24 * 60 * 60 * 1000;
const data = [
  { x: now - oneDay * 6, y: 42 },
  { x: now - oneDay * 5, y: 58 },
  { x: now - oneDay * 4, y: 35 },
  { x: now - oneDay * 3, y: 67 },
  { x: now - oneDay * 2, y: 52 },
  { x: now - oneDay * 1, y: 78 },
  { x: now, y: 64 },
];

function MyChart() {
  return (
    <LineChart
      config={{
        data: data,
        hover: {
          enabled: true,
          showDot: true,
          highlightLine: true,
        },
        xAxis: {
          enabled: true,
          isTimeData: true,
          formatter: (value) => {
            const date = new Date(value);
            return `${date.getMonth() + 1}/${date.getDate()}`;
          },
        },
        yAxis: { enabled: true },
      }}
    />
  );
}