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 🙏

© 2024 – Pkg Stats / Ryan Hefner

rn-chart-desk

v0.1.4

Published

A powerful & easy to use chart library for React Native.

Downloads

4

Readme

rn-chart-desk 📊

A powerful & easy to use chart library for creating customizable charts in React Native (Please note that this package does not have iOS support yet).

Table of content:

TODO: iOS Version

⚠️ When passing data to any of the charts, make sure you pass as JSON.stringify()

Installation

npm install rn-chart-desk

LineChart

rn-chart-desk React Native Line Chart

import { LineChart } from "rn-chart-desk";

// ...

<LineChart
	style={{ flex: 1 }}
	data={JSON.stringify({
		values: [34, 2, 15, 29, 5],
		label: "Second Test",
		color: 'blue'
	})}
	description={""}
	xAxisLabels={JSON.stringify(["Subday", "Monday", "Tuesday", "Wednesday", "Thursday"])}
  roundValues={true}
/>

PieChart

rn-chart-desk React Native Pie Chart

import { PieChart } from "rn-chart-desk";

// ...

<PieChart
	style={{ flex: 1 }}
	data={JSON.stringify([
		{
			value: 5,
			label: "Label 1"
		},
		{
			value: 7,
			label: "Label 2"
		},
		{
			value: 20,
			label: "Label 3"
		},
	])}
	description={"Pie chart for data"}
	roundValues={true}
/>

BarChart

rn-chart-desk React Native Bar Chart

import { BarChart } from "rn-chart-desk";

// ...

<BarChart
	style={{ flex: 1 }}
	data={JSON.stringify({
			values: [34, 2, 15, 29, 5],
			label: "Second Test",
			color: "blue"
		},
	)}
	description={"Bar chart for data"}
	xAxisLabels={JSON.stringify(["Jan", "Feb", "Mar", "Apr", "May"])}
	roundValues={false}
/>

GroupedBarChart

rn-chart-desk React Native Grouped Bar Chart

import { GroupedBarChart } from "rn-chart-desk";

// ...

<GroupedBarChart
  style={{ flex: 1 }}
  data={JSON.stringify([
    {
      values: [3, 2, 9, 10, 3],
      label: "First Dataset",
      color: "#F06F00"
    },
    {
      values: [5, 20, 7, 1, 34],
      label: "Second Dataset",
      color: 'blue'
    },
    {
      values: [30, 2, 15, 29, 5],
      label: "Third Dataset",
      color: 'green'
    },
  ])}
  description={""}
  xAxisLabels={JSON.stringify(["Jan", "Feb", "Mar", "Apr", "May"])}
  roundValues={true}
/>

Remove decimal places on chart values

You can round all values on any of the charts by setting roundValues to true or false

roundValues={true | false}

Author

Babalola Macaulay

Cheers 🥂

Acknowlegement

This package was made possible, thanks to being able to leverage and build on top of the amazing work that was done on MPAndroidChart.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT