Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
Use a React Native chart library rather than a browser-only chart component. Two practical options are victory-native, which maps named data fields with x and y, and react-native-gifted-charts, which accepts bar items with a value field and documents a direct horizontal option. The examples below show how to install and render each one, including the Expo installation path for Gifted Charts.
Choose a library based on the chart you need
Both libraries can render bars in a React Native app and use react-native-svg. The practical difference is how you describe data and configure the chart: Victory’s example composes chart components and maps named data fields; Gifted Charts’ example passes an array of values to a BarChart component.
| Need | Victory Native | react-native-gifted-charts |
|---|---|---|
| Describe categories and values | Set x and y to the names of your data fields. |
Supply bar items with a value field. |
| Horizontal bars | The cited getting-started example does not establish a horizontal configuration. | Use the documented horizontal prop. |
| Stacked bars and touch options | The cited example does not establish the relevant props. | The BarChart props reference includes stackData, onPress, and onLongPress. |
| Chart construction and theming | The example composes VictoryChart, VictoryBar, and VictoryTheme. |
The documented example renders a BarChart with data; its props reference includes styling and sizing options. |
Choose Gifted Charts if the documented horizontal setting or its bar-specific props fit your design. Choose Victory if you want the chart composition shown in its example or prefer to map fields from named records. The cited documentation does not provide a controlled performance comparison, so it cannot establish which library is faster for your app.
Free tools Windows power users keep installed
One-click scans. No signup required.
Install the dependency for your project
Victory Native
Install the chart package and its documented SVG dependency:
#1 Best Overall
npm install victory-native react-native-svg
The Victory repository describes react-native-svg, react, and react-native as peer dependencies. In a React Native project, make sure those peer dependencies are present in the app rather than assuming the chart package supplies them.
Gifted Charts in React Native CLI
The package documents this install command for React Native CLI:
npm install react-native-gifted-charts react-native-linear-gradient react-native-svg
Gifted Charts in Expo
For Expo, follow the package’s Expo-specific install command:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #2
npx expo install react-native-gifted-charts expo-linear-gradient react-native-svg
That command uses expo-linear-gradient, whereas the CLI command uses react-native-linear-gradient. Use the command for your project type instead of mixing the two examples. These instructions reflect the package documentation cited for this article; no specific package versions or compatibility matrix are established here.
Build a bar graph with Victory Native
Victory’s example uses records with a category field and a numeric field. The chart’s x and y props identify which fields represent the categories and values.
import React from 'react';
import { VictoryBar, VictoryChart, VictoryTheme } from 'victory-native';
const data = [
{ quarter: 'Q1', earnings: 12 },
{ quarter: 'Q2', earnings: 18 },
{ quarter: 'Q3', earnings: 14 },
{ quarter: 'Q4', earnings: 24 },
];
export default function EarningsChart() {
return (
<VictoryChart width={350} theme={VictoryTheme.material}>
<VictoryBar data={data} x="quarter" y="earnings" />
</VictoryChart>
);
}
Replace the sample values with the records your screen needs. Keep the field names in the objects and the strings passed to x and y in sync: for example, if your records use month and sales, map those names instead. The example sets a chart width of 350 and applies the material theme; the cited getting-started example does not establish that width as a universal device-responsive setting.
Rank #3
Build a bar graph with Gifted Charts
Gifted Charts documents a minimal data array whose items each contain a value. This React component wraps the chart in a view and passes that array to BarChart:
import React from 'react';
import { View } from 'react-native';
import { BarChart } from 'react-native-gifted-charts';
const data = [
{ value: 50 },
{ value: 80 },
{ value: 90 },
{ value: 70 },
];
export default function SalesChart() {
return (
<View>
<BarChart data={data} />
</View>
);
}
To make the bars horizontal, add the documented prop to the same component:
<BarChart data={data} horizontal />
Use this form when the category labels or available screen width make horizontal bars a better fit. The cited documentation establishes the prop, but does not provide a rule for when a chart should be horizontal; decide based on the labels and layout in your own screen.
Rank #4
Configure size, appearance, interaction, or stacks
The Gifted Charts BarChart reference lists options including width, height, barWidth, frontColor, showGradient, onPress, onLongPress, and stackData. These let you investigate chart dimensions, bar appearance, gradient display, touch callbacks, and stacked bars in the package reference. It also documents other props beyond this list.
- Dimensions: start with
widthorheightif the chart does not fit the space available in its parent. - Bar appearance: use
barWidthorfrontColorwhen adjusting the width or foreground color of bars. - Gradient:
showGradientis listed as an option. Consult the package reference for the exact supported configuration before adding it. - Touch interaction: the reference lists
onPressandonLongPress. Check its callback details before relying on a particular argument shape. - Stacked bars:
stackDatais listed in the reference, but the cited material here does not specify the complete item shape for stacked data. Use the package’s full props documentation for that shape rather than guessing.
Victory’s documented example takes a composition approach: a VictoryChart wraps a VictoryBar, with a theme applied at chart level. The cited example establishes that pattern, not a complete list of Victory’s styling, interaction, or orientation options.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Choose a debugging path when the graph does not appear
Start with the shape of the data and the install path; these are the details the documented examples make explicit. Change one thing at a time so that you can tell whether the issue is a missing dependency, a data-field mismatch, or a layout choice.
- The package cannot be resolved: confirm that you ran the install command for the library you imported. For Gifted Charts, check that you used the Expo command in an Expo project or the CLI command in a CLI project. For Victory, check that both
victory-nativeandreact-native-svgare installed. - A Victory bar has no useful category or value: compare the object keys in
datawith the strings provided toxandy. Those props need to point to the fields actually present in each record. - A Gifted Charts bar is missing or has the wrong value: verify that each item follows the documented minimal shape, such as
{ value: 50 }, and that the array is passed to thedataprop. - The Gifted Charts gradient configuration fails: check that your project uses the gradient package appropriate to its install path—
expo-linear-gradientfor the documented Expo command orreact-native-linear-gradientfor the documented CLI command—and consult the chart reference for the exact gradient settings. - The graph looks cramped or too large: check the size of its parent and, for Gifted Charts, inspect the documented
widthandheightoptions. The Victory example’s fixed width is a starting example, not a guarantee that the same value suits every screen. - Horizontal or stacked bars do not match expectations: verify that you are using Gifted Charts’ documented
horizontalprop for orientation. For stacked data, use the package reference to confirm the requiredstackDatashape; the minimal single-value example is not a stacked-data example.
Check performance and reliability in the target app
There is no controlled benchmark in the cited library documentation comparing the two chart packages on the same devices and datasets. Package descriptions and a minimal example cannot establish a performance winner. Measure with the chart and data size you expect to ship, on the devices and app builds that matter to your users.
For a useful comparison, keep the data, screen layout, and interaction conditions consistent when trying both options. Confirm first that each chart renders the same information correctly; then assess responsiveness in your own app. Treat the result as specific to that workload, not as a universal claim about either package.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server, not a React Native chart library. It will not render a native chart inside your app. If you publish the chart in a web page or want to capture a web-based example, a single request can return a screenshot; use the URL of that page in place of the documentation URL below. See the ScreenshotNeo website and API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://screenshotneo.com/docs/ -o shot.webp
ScreenshotNeo accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of these steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response includes X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents using Claude, Cursor, or another MCP client. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 screenshots. A screenshot API can help capture a web version of a chart, but it is not a substitute for rendering and checking the chart in the native app.
Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

