JSPM

@antv/g-svg

0.3.13
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 163098
  • Score
    100M100P100Q153571F
  • License ISC

A canvas library which providing 2d

Package Exports

  • @antv/g-svg
  • @antv/g-svg/lib/canvas

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@antv/g-svg) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

English | 简体中文

g-svg

npm package npm downloads Percentage of issues still open

  • A svg library which providing 2d draw for AntV.

✨ Features

  • Powerful and scalable rendering capability with built-in basic Graphics.
  • Excellent rendering performance and supports visualization scenarios with large amounts of data.
  • Complete simulation of browser DOM events, and no difference from native events.
  • Smooth animation implementation and rich configuration interfaces.

📦 Install

$ npm install @antv/g-svg --save

🔨 Usage

<div id="c1"></div>
import { Canvas } from '@antv/g-svg';

const canvas = new Canvas({
  container: 'c1',
  width: 500,
  height: 500,
});

const group = canvas.addGroup();
group.addShape('circle', {
  attrs: {
    x: 100,
    y: 100,
    r: 50,
    fill: 'red',
    stroke: 'blue',
    lineWidth: 5,
  },
});