A higher G2 wrapper for React.
import G2Wrapper from 'g2-wrapper';
import React, { Component } from 'react';
class MyComponent extends Component {
state = {
data: [],
width: 500,
height: 250,
plotCfg: {},
cfgFun: chart => {
chart.line().position('time*price').color('name').shape('spline').size(2);
}
}
render() {
return (
<div>
<G2Wrapper { ...this.state } />
</div>
);
}
}
MIT