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

react-easy-chart

v1.0.0

Published

React component implementations of Mike Bostok's D3 visualisation library.

Downloads

1,014

Readme

React Easy Chart

animated graph

Introduction

This set of graphing components aims to be the easiest and fastest way of implementing a graph within a React application.

The graphs all have the following features:

  • Easy to set up with only a requirement for data to render a chart
  • Support realtime data feeds by reacting to data changes passed into the props automatically
  • Fast rendering by using React to minimise the changes to the DOM as a result of data or props changes
  • Configurable via props to allow features such as grids, width, height, axis and many more features to be added
  • Responsive and Reactive graphs to fit to any device
  • Interactive via mouse and click events allowing interesting applications to be built without graphing knowledge

Under the hood we use the fantastic D3 to create and render the charts into SVG. D3 requires some learning and will ultimately provide more flexible charts. The aim of React Easy Chart is to avoid that learning and have a common set of charts that can be set up in minutes.

We have concentrated on making an API that is consistent across a different set of graphs so allowing different graphs to be chosen for the same data set. Currently we provide a bar, line, area, scatter and pie chart.

Installation

npm install react-easy-chart --save

The chart component you wish to use can then be simply imported.
Area chart:

import {AreaChart} from 'react-easy-chart';

Bar chart:

import {BarChart} from 'react-easy-chart';

Line chart:

import {LineChart} from 'react-easy-chart';

Pie chart:

import {PieChart} from 'react-easy-chart';

Scatter chart:

import {ScatterChart} from 'react-easy-chart';

Chart Legend:

import {Legend} from 'react-easy-chart';

Documentation

Each of the charts have had extensive documentation produced for them with working examples. These can be found at http://rma-consulting.github.io/react-easy-chart

Contributing

We welcome pull requests and forks of the current graph implementations. If you are able to follow the API we have set out and are developing a chart we currently do not have we would love to add to our existing library.

Background and Motivation

The project started by trying to optimize D3 charts for React. After some reading and trial and error we came across this blog post http://oli.me.uk/2015/09/09/d3-within-react-the-right-way/ Oliver provided us with a solution that can utilize the react shadow DOM by creating a faux DOM to attach the SVG elements to. This is in our opinion the best current solution.

The complexity of developing D3 based graphs intermittently often means that even experienced JavaScript developers can take days getting back up to speed for making the most simple of Graphs. The React Easy Chart Library is flexible and robust enough to avoid needing to remember D3 syntax when simple graphs are required.

Version

npm version

Build Status

Build Status