react-g2plot
is an unofficial react component wrapper for @antv/g2plot.
$ npm install react-g2plot
import ReactDOM from 'react-dom';
import React from 'react';
import { Line } from '@antv/g2plot'
import ReactG2Plot from 'react-g2plot';
ReactDOM.render(
<ReactG2Plot
className="your-classname"
Ctor={Line}
config={config}
/>,
mountNode,
);
All documents about plot
and config
are here.
$ npm install
# run test case
$ npm run test
# run live demo
$ npm run demo
MIT@hustcc.