Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

react-bulma-chartjs

0.0.6 • Public • Published

react-chartjs

Chartjs component is based on chart.js for React

Installation

npm install react-bulma-chartjs

Usage

import Chart from 'react-bulma-chartjs';
 
const data =  {
      labels: [
        'Red', 'Green', 'Yellow'
      ],
      datasets: [
        {
          data: [
            300, 50, 100
          ],
          backgroundColor: [
            '#FF6384', '#36A2EB', '#FFCE56'
          ],
          hoverBackgroundColor: ['#FF6384', '#36A2EB', '#FFCE56']
        }
      ]
    };
const options = {
      animateRotate: true
    };
 
const App => () =>
  <div>
      // doughnut
      <Chart type={'doughnut'} data={data} options={options}/>
 
      // pie
        <Chart type={'pie'} data={data} options={options}/>
  </div>
 
export default App

Chart type

  • bar
  • doughnut
  • line
  • pie
  • polarArea
  • radar
  • scatter
  • bubble

Install

npm i react-bulma-chartjs

DownloadsWeekly Downloads

0

Version

0.0.6

License

ISC

Unpacked Size

11.1 kB

Total Files

6

Last publish

Collaborators

  • avatar