Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Echarts Component

Echarts component for React

For details about how to use echarts. Please refer to http://echarts.baidu.com/

Types of charts supported/examples: http://echarts.baidu.com/examples.html

Installation

npm install --save react-echarts-component

Usage

// es6
import ReactEcharts from 'react-echarts-component'
// es5
var ReactEcharts = require('react-echarts-component')

<ReactEcharts
  height={400}
  option={{...}}
  showLoading={true}
/>

Props Taken:

  • height (required, number)

    height of the chart, unit: px

  • option (required, object)

    settings for the chart, for details, refer to http://echarts.baidu.com/option.html#title

  • showLoading (optional, bool, default: false)

    whether to show a spinning loader

  • onClick (optional, func)

    callback when data clicked

  • onReady (optional, func)

    callback when then chart is initialized, the echart instance is passed in, for detail, refer to http://echarts.baidu.com/api.html#echartsInstance

License

MIT

About

Echarts wrapper for react

Resources

Contributing

Stars

12 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages