0.0.2 • Published 5 months ago

react-native-customize-donut-chart v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
5 months ago

react-native-customize-donut-chart

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

Screenshots

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

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

  npm install react-native-customize-donut-chart

Usage/Examples

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

PropertyTypeRequired
data{value: number}[]yes
sizenumberno
sliceColorsstring[]no
centerCircle{ isEnable: boolean; color: string }no
percentage{ visible: boolean; textStyle?: { color: string } }no
onSlicePressfunctionno
0.0.2

5 months ago

0.0.1

5 months ago