# react-native-donut-chart

> This is a nice looking donut chart!

Latest version **0.0.16** (published 2022-07-27) · None license · 0 weekly downloads

## Install

```sh
npm install react-native-donut-chart
pnpm add react-native-donut-chart
yarn add react-native-donut-chart
bun add react-native-donut-chart
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.16 |
| Published | 2022-07-27 |
| First published | 2022-06-14 |
| Weekly downloads | 0 |
| License | None |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 625.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | mim_Armand |
| Maintainers | mim |

## Links

- npm: https://www.npmjs.com/package/react-native-donut-chart
- Repository: https://github.com/mim-Armand/react-native-doughnut-chart
- Homepage: https://github.com/mim-Armand/react-native-doughnut-chart#readme
- Issues: https://github.com/mim-Armand/react-native-doughnut-chart/issues
- npm.io page: https://npm.io/package/react-native-donut-chart

## Dependencies (1)

- [react-native-svg](https://npm.io/package/react-native-svg.md) ^12.3.0

## Recent versions

- 0.0.16 (latest) — 2022-07-27
- 0.0.15 — 2022-07-27
- 0.0.14 — 2022-06-21
- 0.0.13 — 2022-06-20
- 0.0.12 — 2022-06-20
- 0.0.11 — 2022-06-15
- 0.0.10 — 2022-06-15
- 0.0.9 — 2022-06-15
- 0.0.8 — 2022-06-15
- 0.0.7 — 2022-06-15
- 0.0.6 — 2022-06-15
- 0.0.5 — 2022-06-15
- 0.0.4 — 2022-06-15
- 0.0.3 — 2022-06-15
- 0.0.2 — 2022-06-14
- … 1 more at https://npm.io/package/react-native-donut-chart/versions

## README

# React Native Donut Chart


This is a simple donut chart that accepts a data object like the following:
```js
const data = [
  {
    value: 1,
    color: 'brown',
  },
  {
    value: 2,
    color: 'red',
  }, {
    value: 3,
    color: 'green',
  }, {
    value: 4,
    color: 'gold',
  }, {
    value: 5,
    color: 'blue',
  },
]

// ...
```
Then
```jsx
import {Donut} from 'react-native-dinut-chart';

<Donut data={data}/>
```

## Props:

| Key              | Description                                | Type             | Required | Default     |
|------------------|--------------------------------------------|------------------|----------|-------------|
| data             | chart data                                 | Array of objects | True     |             |
| radius           | Radius of the donut chart                  | number           | false    | 80          |
| fill             | The chart fill color can be RGBA           | string           | false    | transparent |
| strokeWidth      | The stroke width of the sections           | number           | false    | 10          |
| strokeLinejoin   | The shape of the end of the strokes        | string           | false    | round       |
| gap              | The gap / distance between the sections    | number           | false    | 3           |
| bgStrokeColor    | The background stroke for the chart        | string           | false    | green       |
| bgStrokeOpacity  | The background stroke opacity              | string           | false    | .1          |
| bgStrokePadding  | The additional thickness of the bg stroke  | number           | false    | 0           |


#Note:

This was a fast and quick hack to check the feasibility, more options can and will become available and a lot of improvements can be made.

>Contributors are welcomed, please open an issue, explain what you want to do and after approved make your PR.

Here is a screenshot of the randomized sample data:

<img src="https://raw.githubusercontent.com/mim-Armand/react-native-doughnut-chart/main/screenshot.png" alt="Simulator screenshot" width="444"/>

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