https://github.com/int64ago/g2-wrapper
A higher G2 wrapper for React.
https://github.com/int64ago/g2-wrapper
g2 g2-react
Last synced: 10 months ago
JSON representation
A higher G2 wrapper for React.
- Host: GitHub
- URL: https://github.com/int64ago/g2-wrapper
- Owner: int64ago
- License: mit
- Created: 2017-10-03T05:06:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-25T05:03:12.000Z (over 8 years ago)
- Last Synced: 2025-06-18T18:49:06.411Z (about 1 year ago)
- Topics: g2, g2-react
- Language: JavaScript
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# g2-wrapper
[![NPM version][npm-image]][npm-url]
[![npm download][download-image]][download-url]
[npm-image]: https://img.shields.io/npm/v/g2-wrapper.svg?style=flat-square
[npm-url]: https://npmjs.org/package/g2-wrapper
[download-image]: https://img.shields.io/npm/dm/g2-wrapper.svg?style=flat-square
[download-url]: https://npmjs.org/package/g2-wrapper
A higher [G2](https://antv.alipay.com/g2/doc/index.html) wrapper for React.
## Usage
```jsx
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 (
);
}
}
```
## License
MIT