Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 28 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,46 @@
[![build status](https://img.shields.io/travis/jerairrest/react-chartjs-2.svg?branch=master&style=flat-square)](https://travis-ci.org/jerairrest/react-chartjs-2)
[![version](https://img.shields.io/npm/v/react-chartjs-2.svg?style=flat-square)](https://www.npmjs.com/package/react-chartjs-2)
[![downloads](https://img.shields.io/npm/dm/react-chartjs-2.svg?style=flat-square)](https://npm-stat.com/charts.html?package=react-chartjs-2&from=2016-01-01)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](http://opensource.org/licenses/MIT)

# react-chartjs-2

React wrapper for [Chart.js](http://www.chartjs.org/docs/#getting-started)

## Getting started

### Install library with peer dependencies
<div align="center">

<h1>React components for <a href="https://www.chartjs.org">Chart.js</a> 📊📈</h1>

Simple yet flexible charts for your React app

[![version](https://img.shields.io/npm/v/react-chartjs-2.svg)](https://www.npmjs.com/package/react-chartjs-2)
[![downloads](https://img.shields.io/npm/dm/react-chartjs-2.svg)](https://www.npmjs.com/package/react-chartjs-2)
[![license](https://shields.io/badge/license-MIT-green)](http://opensource.org/licenses/MIT)

<br />
<a href="#quickstart">Quickstart</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="#examples">Examples</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://slack.cube.dev/?ref=eco-react-chartjs">Slack</a>
<br />
<hr />
</div>

## Quickstart

Install this library with peer dependencies:

```bash
npm install --save react-chartjs-2 chart.js

# or

yarn add react-chartjs-2 chart.js
```

###### We recommend using `chart.js ^3.0.0`
We recommend using `chart.js@^3.0.0`.

### Usage
Then, import and use individual components:

```jsx
import { Doughnut } from 'react-chartjs-2';

<Doughnut data={...} />
```

## Examples
Need an API to fetch data? Consider [Cube](https://cube.dev/?ref=eco-react-chartjs), an open-source API for data apps.

Live: [reactchartjs.github.io/react-chartjs-2](https://reactchartjs.github.io/react-chartjs-2/#/)
## Examples

See [these examples](example) for more information
Please see [live examples](https://reactchartjs.github.io/react-chartjs-2/) or their [source code](example).

## Configure

Expand Down