Library / SDK
Abhinandan-Kushwaha/react-native-gifted-charts avatar
Abhinandan-Kushwaha/react-native-gifted-charts

react-native-gifted-charts for React Native Data Visualization

The most loved library for Bar, Line, Area, Pie, Donut, Stacked Bar, Population Pyramid, Radar, Bubble, Scatter and Candle Stick charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.

1,376 stars209 forksTypeScriptMIT

At a glance

What is it?
react-native-gifted-charts gives React Native applications a set of animated and interactive chart components. It supports many common chart families, but it also requires SVG and linear-gradient packages and expects chart-specific data shapes.
Who is it for?
Adopt react-native-gifted-charts when a React Native application needs several chart families without assembling SVG primitives, interactions, and animations from scratch. Do not choose it for a web-only React application or when its native dependencies cannot be supported.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 18 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Chart Components for React Native Product Screens

react-native-gifted-charts addresses a specific product problem: adding charts to React Native screens without creating a rendering layer for every chart family. It is for mobile developers who need graphical data inside an application rather than a static image or a browser dashboard. The package exposes Bar, Line, Area, Pie, Donut, Stacked Bar, Population Pyramid, Radar, Bubble, Scatter, and Candle Stick charts. That breadth matters when one product contains several analytical views, since the application can use separate components while retaining a similar data and configuration approach.

The README also identifies clickable and scrollable charts, combined Bar and Line charts, 3D and gradient effects, and animations on load or value change. Live data updates are part of the advertised feature set. These features fit operational and reporting screens where values change while someone is looking at them. They do not turn the package into a general-purpose analytics environment. It renders charts but does not provide data queries, aggregation services, dashboards, or server-side reporting according to the repository documentation.

The primary implementation language is TypeScript. Published files are limited to `dist`, and `package.json` names `dist/index.js` as the package entry point. The source tree, tests, examples, TypeScript configuration, and chart-specific documentation remain in the repository. This structure is useful when a team needs to inspect implementation details or compare the examples, but npm consumers receive the compiled package rather than the complete source tree. The intended user is therefore a developer integrating a React Native component library, not someone seeking a standalone chart-generation service.

Chart Data Contracts and Component Variants

Gifted Charts uses named React Native components and a `data` prop. The simplest bar, line, and pie examples accept an array of objects containing `value`. Other chart families expect different records. Population Pyramid data contains `left` and `right`; Radar Chart data is an array of numbers; Bubble Chart points contain `x`, `y`, and `r`; Candle Stick Chart points contain `open`, `close`, `high`, and `low`. An application model therefore needs an adapter when its domain objects do not already match one of these contracts.

Some chart variants change through props rather than a separate top-level component. The README says a horizontal Bar Chart receives `horizontal`, an Area Chart receives `areaChart` on `LineChart`, a Donut Chart receives `donut` on `PieChart`, and Scatter Chart mode receives `scatterChart` on `BubbleChart`. This compact API keeps related configurations together, although it means component and prop names must be understood together. Selecting `LineChart` does not itself tell a reader whether it will render an ordinary line or an area chart.

The package depends on `gifted-charts-core` version `0.1.83`. The README describes that package as containing the mathematical and logical utilities used by react-native-gifted-charts. That division places reusable calculation concerns outside the React Native presentation package. The README does not list the utility functions or describe their individual algorithms, so those details should be checked in `gifted-charts-core` before making assumptions about scaling, geometry, or financial calculations.

The package metadata also identifies `react`, `react-native`, `react-native-svg`, and the relevant gradient implementation as peer dependencies. The wildcard version ranges documented in `package.json` do not provide a compatibility matrix. They express the package's host requirements without claiming support for every React Native release.

Installing Native Dependencies for React Native CLI

The React Native CLI installation requires the chart package and two native rendering dependencies. Run this command in the application that will consume the library:

sh
npm install react-native-gifted-charts react-native-linear-gradient react-native-svg

The README explicitly says that `react-native-svg` and `react-native-linear-gradient` are needed for the library to work. This makes installation more involved than adding a package with no native peers. The application also needs the compatible React Native host and a `react` package, both of which appear as peer dependencies in `package.json`.

The README does not provide a separate native linking command for react-native-gifted-charts. It also does not give a consumer-facing verification command after installation. Repository scripts such as `react-native run-android`, `react-native run-ios`, `react-native start`, `npm test`, and `npm run lint` describe development of the repository itself. They should not be treated as required application setup unless the project maintainers document that context elsewhere.

For this library, the first practical check belongs in the consuming React Native application: add the basic Bar Chart example, build the target platform, and confirm that its required native dependencies load. That is an integration sequence, not a command documented by this repository. The README remains silent about rollback and does not specify whether a native rebuild is required after package updates. Those steps should be taken from the React Native or Expo documentation matching the application's setup.

Installing and Calling Gifted Charts with Expo

Expo uses a different gradient package name. The documented installation command is:

sh
npx expo install react-native-gifted-charts expo-linear-gradient react-native-svg

This command pairs the chart package with `expo-linear-gradient` and `react-native-svg`. A React Native CLI application instead receives `react-native-linear-gradient` through the earlier command. The distinction matters because copying the CLI command into an Expo project would install a different gradient implementation from the one documented for Expo.

After installation, the shortest documented use imports one or more chart components and prepares a `data` array. The repository uses the following example exactly:

js
import { BarChart, LineChart, PieChart, PopulationPyramid, RadarChart, BubbleChart, CandleStickChart } from "react-native-gifted-charts";

The README then declares a four-item value array:

js
const data=[ {value:50}, {value:80}, {value:90}, {value:70} ]

Render the Bar Chart in an existing React Native screen with the documented component call:

js
<BarChart data = {data} />

The expected visible result is a chart built from values 50, 80, 90, and 70. The README does not specify exact pixel dimensions, colors, axis labels, fonts, or safe-area behavior for this minimal example. Those defaults should not be inferred from a screenshot because the package offers many customization props.

Area, Donut, Scatter, and Financial Chart Inputs

The same value array can feed Line Chart and Pie Chart components. Area Chart mode is an option on `LineChart`, while Donut Chart mode is an option on `PieChart`. The README documents these two calls:

js
<LineChart data = {data} areaChart />
js
<PieChart data = {data} donut />

Bubble Chart introduces two-dimensional positioning and a radius. The documented scatter example uses two points and enables `scatterChart`:

js
<BubbleChart
  data = {[
    {x: 20, y: 4, r: 10},
    {x: 40, y: 6, r: 20},
  ]}
  scatterChart
/>

Candle Stick Chart requires financial-style values but does not add a documented date field in the basic example. Its points contain four numbers:

js
<CandleStickChart data = {[
  {open: 82, close: 76, high: 90, low: 60},
  {open: 50, close: 57, high: 71, low: 44},
]} />

These shapes are concrete integration boundaries. A team should not pass arbitrary application objects directly. It needs to map each object to the documented fields and decide how missing values, labels, and dates should behave. The README does not state how malformed points are handled. Its linked chart prop tables are the first place to look for accepted data and optional rendering fields.

Animation, Interaction, and Native Package Boundaries

The README states that chart animations use React Native's `Animated` API and require no separate animation library. It also says animations can be applied when a chart loads and when values change. That is a meaningful distinction from a chart package built around another animation dependency, but it also means animation behavior remains tied to the host framework.

Interactivity is documented as clickable and scrollable charts. The README images also show a chart with a pointer and one with a crosshair, although the available usage excerpt does not provide the full props for those configurations. Interaction setup should therefore be checked in the linked Bar Chart, Line Chart, Bubble Chart, Candle Stick Chart, Pie Chart, Radar Chart, and Population Pyramid prop tables. The README alone is not a complete event-handling reference.

Gradients add another native dependency choice. React Native CLI installations use `react-native-linear-gradient`; Expo installations use `expo-linear-gradient`. This is not interchangeable naming guidance. It reflects two installation paths documented by the project, and an application must use the path appropriate to its environment.

The README does not document rollback behavior, server-side rendering, chart export, accessibility labels, or offline use. That silence should not be read as proof that those capabilities are impossible. It does mean an adoption decision cannot rely on them without finding separate documentation or inspecting the implementation.

Maintenance History, License, and Alternative Rendering Paths

The repository is not archived. Its last push was on 2026-10-05. Releases v1.4.79 and v1.4.80 were published on 2026-10-01, and v1.4.81 was published on 2026-10-05. These dates show recent repository activity, but they do not establish a compatibility guarantee for every React Native or Expo release. The package version in `package.json` is `1.4.81`.

The repository declares the MIT license in both `LICENSE` and `package.json`. The documentation shown here does not provide legal advice or describe exceptions for native dependencies. Teams that need organization-specific license review must examine those dependencies separately. The upgrade surface includes `gifted-charts-core` as a runtime dependency and the SVG and gradient packages as peer requirements, so upgrading only the top-level chart version does not remove the need to check native compatibility.

The README names `react-gifted-charts` as the ReactJS counterpart and says the same chart code can render on the web. That is a different runtime target, not merely another version of the React Native package. Another valid approach is to draw directly with `react-native-svg`. A custom SVG implementation avoids the chart component layer but makes axes, scales, labels, gestures, and animations application responsibilities. Gifted Charts reduces that work at the cost of conforming to its data contracts, props, and native package requirements.

Editorial conclusion

Adopt react-native-gifted-charts when a React Native application needs several chart families without assembling SVG primitives, interactions, and animations from scratch. Do not choose it for a web-only React application or when its native dependencies cannot be supported. Verify first that `react-native-svg` and the appropriate gradient package fit the project's React Native or Expo environment, then check the prop table for the selected chart.

Frequently asked questions

How do I install react-native-gifted-charts in a React Native CLI project?

Install `react-native-gifted-charts`, `react-native-linear-gradient`, and `react-native-svg` with the React Native CLI installation command. The README identifies both native packages as required.

How do I create a bar chart with react-native-gifted-charts?

Import `BarChart`, declare objects with a `value` property, and pass the array through its `data` prop. The README's basic example uses values 50, 80, 90, and 70.

Which gradient package does react-native-gifted-charts use with Expo?

The Expo installation command uses `expo-linear-gradient`. React Native CLI installations use `react-native-linear-gradient`.

Official sources

  1. Abhinandan-Kushwaha/react-native-gifted-charts on GitHub
  2. License: MIT
  3. Project website
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/abhinandan-kushwaha-react-native-gifted-charts.svg)](https://hysenlabs.com/projects/abhinandan-kushwaha-react-native-gifted-charts)

Was this useful?