# react-charts-d3

> A collection of easy to use charts created in D3 for your React applications.

Latest version **2.4.1** (published 2018-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-charts-d3
pnpm add react-charts-d3
yarn add react-charts-d3
bun add react-charts-d3
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.4.1 |
| Published | 2018-11-09 |
| First published | 2018-03-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 14 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Nick Turner |
| Maintainers | nick-dave-turner |
| Keywords | d3, react, charts, ReactJS, react-component |

## Links

- npm: https://www.npmjs.com/package/react-charts-d3
- Repository: https://github.com/nick-dave-turner/react-charts-d3
- Homepage: https://nick-dave-turner.github.io/react-charts-d3.github.io/
- Issues: https://github.com/nick-dave-turner/react-charts-d3/issues
- npm.io page: https://npm.io/package/react-charts-d3

## Dependencies (14)

- [react](https://npm.io/package/react.md) ^16.2.0
- [d3-axis](https://npm.io/package/d3-axis.md) ^1.0.8
- [d3-ease](https://npm.io/package/d3-ease.md) ^1.0.3
- [d3-array](https://npm.io/package/d3-array.md) ^1.2.1
- [d3-color](https://npm.io/package/d3-color.md) ^1.0.3
- [d3-scale](https://npm.io/package/d3-scale.md) ^2.0.0
- [d3-shape](https://npm.io/package/d3-shape.md) ^1.2.0
- [d3-format](https://npm.io/package/d3-format.md) ^1.2.2
- [react-dom](https://npm.io/package/react-dom.md) ^16.2.0
- [d3-dispatch](https://npm.io/package/d3-dispatch.md) ^1.0.3
- [d3-selection](https://npm.io/package/d3-selection.md) ^1.3.0
- [d3-transition](https://npm.io/package/d3-transition.md) ^1.1.1
- [d3-interpolate](https://npm.io/package/d3-interpolate.md) ^1.1.6
- [d3-scale-chromatic](https://npm.io/package/d3-scale-chromatic.md) ^1.2.0

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 2.4.1 (latest) — 2018-11-09
- 2.4.0 — 2018-04-29
- 2.3.1 — 2018-04-07
- 2.3.0 — 2018-04-07
- 2.2.2 — 2018-03-30
- 2.2.1 — 2018-03-30
- 2.1.1 — 2018-03-29
- 2.1.0 — 2018-03-29
- 2.0.0 — 2018-03-29
- 1.0.1 — 2018-03-24
- 1.0.0 — 2018-03-23

## README

# react-charts-d3
A collection of easy to use charts created in D3 for your React applications.

* Area Chart
* Bar Chart
* Bubble Chart
* Line Chart
* Pie Chart
* Scatter Chart

[View chart examples](https://nick-dave-turner.github.io/react-charts-d3.github.io/)

## Installation

Run

```sh
yarn add react-charts-d3
```

And import the chart types you want

```es6
import { BarChart } from 'react-charts-d3';
```

## Charts

[Area chart](https://nick-dave-turner.github.io/react-charts-d3.github.io/#areachart)

```jsx
<AreaChart data={data} />
```

[Bar chart](https://nick-dave-turner.github.io/react-charts-d3.github.io/#barchart)

```jsx
<BarChart data={data} />
```

[Bubble chart](https://nick-dave-turner.github.io/react-charts-d3.github.io/#bubblechart)

```jsx
<BubbleChart data={data} />
```

[Line chart](https://nick-dave-turner.github.io/react-charts-d3.github.io/#linechart)

```jsx
<LineChart data={data} />
```

[Pie chart](https://nick-dave-turner.github.io/react-charts-d3.github.io/#piechart)

```jsx
<PieChart data={data} />
```

[Scatter chart](https://nick-dave-turner.github.io/react-charts-d3.github.io/#scatterchart)

```jsx
<ScatterChart data={data} />
```

##### Full list of options for each chart is available under PROPS & METHODS in the example guide.

## Data Structures

#### Area / Bar / Line / Scatter Charts

```jsx
const data = [
  { key: 'Group 1', values: [ { x: 'A', y: 23 }, { x: 'B', y: 8 } ] },
  { key: 'Group 2', values: [ { x: 'A', y: 15 }, { x: 'B', y: 37 } ] },
];
```

#### Bubble Chart

```jsx
const data = [
  { key: 'Group 1', values: [ { x: 'A', y: 23, r: 4 }, { x: 'B', y: 8, r: 19 } ] },
  { key: 'Group 2', values: [ { x: 'A', y: 15, r: 11 }, { x: 'B', y: 37, r: 21 } ] },
];
```

#### Pie Chart

```jsx
const data = [
  { label: 'Group 1', value: 23 },
  { label: 'Group 2', value: 15 },
];
```

## Changelog

Check out [CHANGELOG.md](CHANGELOG.md)

## Contributing

Contributions are welcome. Check out [CONTRIBUTING.md](CONTRIBUTING.md)

- [Report bugs here.](https://github.com/nick-dave-turner/react-charts-d3/issues)

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