liuyi-g2-wrapper

1.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i liuyi-g2-wrapper

Weekly Downloads

1

Version

1.1.0

License

MIT

Last publish

Collaborators

  • liuyiliuyi