npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-pizza-chart

v1.0.9

Published

A customizable and animated pizza chart component for React Native

Readme

React Native Pizza Chart

Pizza Chart Demo

A customizable and animated pizza chart component for React Native applications.

Features

  • 🍕 Beautiful animated pizza chart with customizable slices
  • 📊 Animated legend with scrollable items
  • 🎨 Customizable colors, gradients, and animations
  • 🌓 Dark mode support
  • 📱 Responsive design that adapts to different screen sizes
  • ⚙️ Highly configurable with many customization options
  • 📱 Expo compatible

Installation

npm install react-native-pizza-chart
# or
yarn add react-native-pizza-chart

Dependencies

This package requires react-native-svg as a peer dependency:

npm install react-native-svg
# or
yarn add react-native-svg

Usage

import React from 'react';
import {View, SafeAreaView} from 'react-native';
import {PizzaChart, defaultStorageData} from 'react-native-pizza-chart';

const App = () => {
  return (
    <SafeAreaView style={{flex: 1}}>
      <View style={{flex: 1, justifyContent: 'center', alignItems: 'center'}}>
        <PizzaChart
          data={defaultStorageData}
          totalStorage={100}
          animationDuration={1500}
          animationSpeed={1.5}
          showEmptySpace={true}
          showPizza={true}
          showLegend={true}
          title="Storage Chart"
          emptySpaceTitle="Free Space"
        />
      </View>
    </SafeAreaView>
  );
};

export default App;

Props

| Prop | Type | Default | Description | | ------------------- | --------------- | ----------------- | ------------------------------------------- | | data | StorageItem[] | Required | Array of data items to display in the chart | | totalStorage | number | 128 | Total storage capacity | | animationDuration | number | 1000 | Duration of the animation in milliseconds | | animationSpeed | number | 1 | Speed multiplier for the animation | | showLegend | boolean | true | Whether to show the legend | | showEmptySpace | boolean | false | Whether to show empty space as a slice | | showPizza | boolean | true | Whether to show the pizza slices | | title | string | 'Storage Chart' | Title of the chart | | emptySpaceTitle | string | 'Empty Space' | Title for the empty space slice |

Data Format

Each item in the data array should follow this format:

type StorageItem = {
  name: string; // Name of the item
  size: number; // Size of the item
  color: string; // Main color (hex or rgba)
  gradientStart: string; // Gradient start color
  gradientEnd: string; // Gradient end color
  innerColor: string; // Color for the inner part of the slice
};

Customization

You can customize the appearance of the chart by modifying the data items or by using the provided props.

Example with Custom Data

const customData = [
  {
    name: 'Photos',
    size: 32.5,
    color: '#FF6B6B',
    gradientStart: '#FF8E8E',
    gradientEnd: '#FF5252',
    innerColor: 'rgba(255, 107, 107, 0.2)',
  },
  {
    name: 'Videos',
    size: 45.2,
    color: '#4ECDC4',
    gradientStart: '#6BE3DA',
    gradientEnd: '#41B3AC',
    innerColor: 'rgba(78, 205, 196, 0.2)',
  },
  // Add more items as needed
];

// Then use it in your component
<PizzaChart data={customData} totalStorage={128} />;

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.