g2-wrapper
v1.1.3
Published
A higher G2 wrapper for React
Downloads
7
Readme
g2-wrapper
A higher G2 wrapper for React.
Usage
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>
);
}
}
License
MIT