# react-native-customize-donut-chart

> customizable donut chart

Latest version **0.0.2** (published 2023-12-05) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2023-12-05 |
| First published | 2023-12-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Tharindu Dasun Nanayakkara |
| Maintainers | dasuntn |
| Keywords | react, react native, donut graph, d3 |

## Links

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

## Dependencies (1)

- [d3-shape](https://npm.io/package/d3-shape.md) ^3.2.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.2 (latest) — 2023-12-05
- 0.0.1 — 2023-12-05

## README

# react-native-customize-donut-chart

The simple customizable donut chart component for the React Native app supports both iOS and Android.

## Screenshots

<img width="250" alt="Screenshot 2023-12-04 at 15 41 03" src="https://github.com/dasuntn/react-native-customize-donut-chart/assets/15120571/e0785d24-ab9a-463e-bd02-44757314d8b2">

<img width="250" alt="Screenshot 2023-12-04 at 15 40 52" src="https://github.com/dasuntn/react-native-customize-donut-chart/assets/15120571/b24d999c-6a00-452b-9916-79abbef70b21">

## Demo

https://github.com/dasuntn/react-native-customize-donut-chart/assets/15120571/31ad57cd-64ee-4573-81a9-45a2153d4cb5

## Features

- Cross platform
- Donut slice is clickable
- Custom colors can be passed
- Add any component to center of the donut




## Installation

### Required dependencies

 - react
 - react-native 
 - react-native-svg (https://www.npmjs.com/package/react-native-svg)

Install react-native-customize-donut-chart with npm

```bash
  npm install react-native-customize-donut-chart
```
    
## Usage/Examples

```javascript
import React from "react";
import DonutChart from "react-native-customize-donut-chart";

const exampleData = [{ value: 10 }, { value: 20 }, { value: 40 }];

const ChartComponent = () => {
  return <DonutChart data={exampleData} />;
};

export default ChartComponent;

```


## Props

| Property	| Type | Required |
|-----------|------|----------|
|   data    |  {value: number}[] |  yes |
|   size    |  number |  no |
|   sliceColors    |  string[] |  no |
|   centerCircle    |  { isEnable: boolean; color: string } |  no |
| percentage |  { visible: boolean; textStyle?: { color: string } } |  no |
| onSlicePress | function | no |

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