The component module for antv
$ npm install @antv/component
Visualization components for AntV, based on G which is a flexible rendering engine for visualization.
Canvas
, SVG
or WebGL
with same code.$ npm install @antv/component
$ yarn add @antv/component
import { Canvas } from '@antv/g';
import { Renderer } from '@antv/g-canvas';
import { Button } from '@antv/component';
// 1. New a canvas.
const canvas = new Canvas({
container: 'container',
width: 600,
height: 600,
renderer: new Renderer(),
});
// 2. Create a button with configure.
const button = new Button({
/* ... */
});
// 3. Append into G canvas.
canvas.appendChild(button);
// 4. Render.
canvas.render();
$ git clone git@github.com:antvis/component.git
$ cd component
$ npm install
$ npm run dev
Then send a pull request on GitHub.
MIT@AntV.
© 2010 - cnpmjs.org x YWFE | Home | YWFE