A very simple echarts(v3.0) wrapper for react.
echart-for-reactA very simple echarts(v3.0) wrapper for react. https://github.com/hustcc/echarts-for-react
installnpm install echart-for-react How to run the demo: git clone git@github.com:hustcc/echarts-for-react.git npm install npm start then open http://127.0.0.1:8080/ in your browser. or see http://hustcc.github.io/echarts-for-react/ usageSimple demo code: more can see: http://hustcc.github.io/echarts-for-react/ import React from 'react'; import ReactEcharts from '../src/echarts-for-react'; <ReactEcharts option={this.getOtion()} height={300} onEvents={onEvents} /> component props
the echart option config,can see http://echarts.baidu.com/option.html#title.
the
when chart is ready,will callback the function with the echart object as it's paramter.
binding the echarts event,will callback the function with the echart event parameter,and let onEvents = { 'click': this.onChartClick,'legendselectchanged': this.onChartLegendselectchanged } ... <ReactEcharts option={this.getOtion()} height={300} onEvents={onEvents} /> for more event name,see: http://echarts.baidu.com/api.html#events TODO
LICENSEMIT (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |