# react-amcharts4

> A react wrapper component for `@amcharts/amcharts4` where (any) chart is rendered using JSON config pattern of @amcharts/amcharts4 and also taking care of updates to the rendered charts.

Latest version **0.0.6** (published 2025-07-10) · 0 weekly downloads

## Install

```sh
npm install react-amcharts4
pnpm add react-amcharts4
yarn add react-amcharts4
bun add react-amcharts4
```

## Health

**Score 20/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2025-07-10 |
| First published | 2019-06-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Abhishek Ramesh |
| Maintainers | abhiisheek |
| Keywords | amcharts4, react |

## Links

- npm: https://www.npmjs.com/package/react-amcharts4
- npm.io page: https://npm.io/package/react-amcharts4

## Dependencies (4)

- [react](https://npm.io/package/react.md) ^16.5.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.5.0
- [@amcharts/amcharts4](https://npm.io/package/@amcharts/amcharts4.md) ^4.5.3
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.5.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

- 0.0.6 (latest) — 2025-07-10
- 0.0.4 — 2019-07-16
- 0.0.3 — 2019-07-15
- 0.0.2 — 2019-07-15
- 0.0.1 — 2019-06-26

## README

# Amcharts4 React

A react wrapper component for `@amcharts/amcharts4` where (any) chart is rendered using JSON config pattern of @amcharts/amcharts4 and also taking care of updates to the rendered charts.

## Install

```
npm install --save react-amcharts4
```

## Usage

```jsx
import React from "react";

import AmChart4Wrapper from "react-amcharts4";

import { PieChart } from "@amcharts/amcharts4/charts";

// Configure any reguired theme
import * as am4core from "@amcharts/amcharts4/core";
import am4themes_material from "@amcharts/amcharts4/themes/material";

am4core.useTheme(am4themes_material);

const config = {
  // Create pie series
  series: [
    {
      type: "PieSeries",
      dataFields: {
        value: "litres",
        category: "country"
      }
    }
  ],
  // Add data
  data: [
    {
      country: "Lithuania",
      litres: 501.9
    },
    {
      country: "Czech Republic",
      litres: 301.9
    },
    {
      country: "Ireland",
      litres: 201.1
    },
    {
      country: "Germany",
      litres: 165.8
    },
    {
      country: "Australia",
      litres: 139.9
    },
    {
      country: "Austria",
      litres: 128.3
    },
    {
      country: "UK",
      litres: 99
    },
    {
      country: "Belgium",
      litres: 60
    },
    {
      country: "The Netherlands",
      litres: 50
    }
  ]
};

const onChartCreated = chartInstance => {
  // Callback with chartInstance
};

const Demo = props => {
  return (
    <div style={{ width: "80%", margin: "0 auto" }}>
      <AmCharts4Wrapper
        config={config}
        id="amcharts-4"
        chartTypeClass={PieChart}
        onChartCreated={onChartCreated}
      />
    </div>
  );
};

export default Demo;
```

> _Note: For information on the chart's config, refer [@amcharts/amchart4](https://www.amcharts.com) documentation._

## License

MIT © [Abhishek Ramesh](https://github.com/abhiisheek)

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