Skip to content

alan2207/apexcharts-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apexcharts-React

NpmVersion

Unofficial react wrapper for apexcharts.js

Getting Started:

Install the package: npm install apexcharts-react

Usage:

import React from 'react';
import Chart from 'apexcharts-react';

const options = {...} // check out the docs

class ExampleComponent extends React.Component() {
  this.state = {
    options
  }

  render() {
    return (
      <div className="App">
        <Chart
          expose={chart => (this.chart = chart)}
          options={this.state.options}
        />
      </div>
    );
  }
}

There is also an example app inside the example folder.

Props:

  • options - object.isRequired - options for the chart - for more info check out the docs

  • expose - func - function that exposes the chart instance to the parent component in order to enable user to call the instance methods from the outside of the chart component

For more info on how to create charts check out the official docs.

About

Unofficial react wrapper for apexcharts.js

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published