Skip to content

Installation

SwiftChart is published as @arshad-shah/swift-chart. React is an optional peer dependency — install it only if you plan to use the /react entry point.

Terminal window
pnpm add @arshad-shah/swift-chart

Canvas 2D + ResizeObserver: Chrome 64+, Firefox 69+, Safari 13.1+, Edge 79+.

| Entry | Gzipped | Brotli | |---|---|---| | Core (@arshad-shah/swift-chart) | ~25.9 KB | ~22.8 KB | | React (@arshad-shah/swift-chart/react) | ~25.2 KB | ~22.6 KB |

These figures are the full barrel — every chart class plus helpers. Real apps import only what they render, so tree-shaking cuts this sharply: a LineChart-only build is ~8 KB Brotli. The two entry points also share most of their code, so importing both does not double the bundle.