react-native-fab-pie

Library to draw animated pie charts. Built with React Native ART + d3 and native animations.

Usage no npm install needed!

<script type="module">
  import reactNativeFabPie from 'https://cdn.skypack.dev/react-native-fab-pie';
</script>

README

React Native Fab Pie

A very small library to help drawing beautiful animated pie charts. It uses React Native ART, d3 and native animations.
Compatible with expo

Playground

Here there is the expo snack you can play with: https://snack.expo.io/@giacomocerquone/react-native-fab-pie

Demo

Todo

  • doc
  • prop-types
  • tests

Motivation

I needed a lib to display only a pie chart. I immediately saw react-native-svg-charts.
Cool, but what I needed was just a pie chart, plus I wanted to animate it and despite that lib has an animation prop, the developer disabled it because it isn't working. So I noticed that the code for the pie chart was all contained in one file, I copied it and I started hacking on it to get what I wanted.
I understand that for you is not ideal to have 2+ packages to draw charts, but I just needed a drop in component for my app. I could have done a fork and do a PR to support this kind of animation, but, as I said, I just needed a pie chart plus I don't know if they'd accept it. Anyway a PR is something I'm considering (you can do it too :) )

Inspiration: