# @patternfly/react-charts

> This library provides a set of React chart components for use with the PatternFly reference implementation.

Latest version **8.7.0** (published 2026-10-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @patternfly/react-charts
pnpm add @patternfly/react-charts
yarn add @patternfly/react-charts
bun add @patternfly/react-charts
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.7.0 |
| Published | 2026-10-15 |
| First published | 2018-10-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 4.2 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 858 |
| Author | Red Hat |
| Maintainers | dgutride, dlabrecq, patternfly-build, jeff-phillips-18, mturley, bennyp, mwcz, kylebuch8, evwilkin, schulj12, nicolethoen, heymp, zhawkins, dlabaj, ausuliv, kmcfaul |
| Keywords | react, patternfly |

## Links

- npm: https://www.npmjs.com/package/@patternfly/react-charts
- Repository: https://github.com/patternfly/patternfly-react
- Homepage: https://github.com/patternfly/patternfly-react#readme
- Issues: https://github.com/patternfly/patternfly-react/issues
- npm.io page: https://npm.io/package/@patternfly/react-charts

## Dependencies (5)

- [tslib](https://npm.io/package/tslib.md) ^2.8.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.23
- [hoist-non-react-statics](https://npm.io/package/hoist-non-react-statics.md) ^3.3.2
- [@patternfly/react-styles](https://npm.io/package/@patternfly/react-styles.md) ^6.7.0
- [@patternfly/react-tokens](https://npm.io/package/@patternfly/react-tokens.md) ^6.7.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 8.7.0 (latest) — 2026-10-15
- 8.7.0-prerelease.4 (prerelease) — 2026-10-05
- 8.5.1 (prerelease-patch) — 2026-05-21
- 7.4.9 (prerelease-v5) — 2025-01-24
- 8.0.0-alpha.39 (alpha) — 2024-08-27
- 7.2.2 (prerelease-bugfix) — 2024-03-05
- 6.94.21 (prerelease-v4) — 2023-06-05
- 5.3.22 (v3) — 2020-06-09
- 8.7.0-prerelease.3 — 2026-10-02
- 8.7.0-prerelease.2 — 2026-09-30
- 8.7.0-prerelease.1 — 2026-09-29
- 8.6.1-prerelease.4 — 2026-09-24
- 8.6.1-prerelease.3 — 2026-09-15
- 8.6.1-prerelease.2 — 2026-09-11
- 8.6.1-prerelease.1 — 2026-08-31
- … 1162 more at https://npm.io/package/@patternfly/react-charts/versions

## README

# @patternfly/react-charts

This package provides PatternFly charting components for [PatternFly][patternfly].

### Installing

```sh
yarn add @patternfly/react-charts
yarn add victory
```

or

```sh
npm install @patternfly/react-charts --save
npm install victory --save
```

Note that Victory is now an optional peer dependency, allowing future chart libraries to be installed without including Victory dependencies and vice versa
  - You may choose to install the single "victory" package to cover all features
  - Or, install packages based on the features used in your app (e.g., "victory-core", "victory-tooltip", etc.).

# Usage

#### Pre-requisites

It's strongly advised to use the PatternFly Base CSS in your whole project, or some components may diverge in appearance:

```js
import '@patternfly/react-core/dist/styles/base.css';
```

#### Example Component Usage

```js
import { Area } from '@patternfly/react-charts/victory';

export default <Area />;

<Area data={[{ x: 1, y: 1 }, { x: 2, y: 2 }]} />;
```

All css related to each component is provided alongside it. There is no component level CSS to import.

# Documentation

This project uses Gatsby. For an overview of the project structure please refer to the [Gatsby documentation - Building with Components](https://www.gatsbyjs.org/docs/building-with-components/).

A comprehensive list of components and detailed usage of each can be found on the [PatternFly React Docs][docs] website
You can also find how each component is meant to be used from a design perspective on the [PatternFly 4 Core][patternfly-4] website.

Note: All commands below assume you are on the root directory in this repository.

### Install & run locally

Run to install all the dependencies, build and run the site locally.

```sh
yarn install && yarn start
```

# Contributing Components

This library makes use of the babel plugin from [@patternfly/react-styles](../react-styles/README.md) to enable providing the CSS alongside the components. This removes the need for consumers to use (style|css|sass)-loaders. For any CSS not provided by core please use the `StyleSheet.create` utility from [@patternfly/react-styles](../react-styles/README.md). This will prevent collisions with any consumers, and allow the CSS to be bundled with the component.

### Building

```
yarn build
```

Note the build scripts for this are located in the root package.json under `yarn build`.

### Testing

Testing is done at the root of this repo. To only run the @patternfly/react-charts tests:

```
yarn test packages/react-charts
```

[patternfly-4]: https://github.com/patternfly/patternfly
[docs]: https://react-staging.patternfly.org/

---
_Source: https://npm.io/package/@patternfly/react-charts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
