1.1.0 • Published 6 years ago

liuyi-g2-wrapper v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

g2-wrapper

NPM version npm download

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