Skip to content

int64ago/g2-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A higher G2 wrapper for React.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published