Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antv/g-canvas

Package Overview
Dependencies
Maintainers
66
Versions
347
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/g-canvas

A renderer implemented by Canvas 2D API

  • 2.0.27
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
66
Created

What is @antv/g-canvas?

@antv/g-canvas is a 2D rendering engine for AntV, a suite of data visualization solutions. It provides a high-performance canvas rendering environment for creating complex visualizations and graphics.

What are @antv/g-canvas's main functionalities?

Basic Shape Drawing

This feature allows you to draw basic shapes like circles, rectangles, and lines on the canvas.

const { Canvas } = require('@antv/g-canvas');
const canvas = new Canvas({ container: 'container', width: 600, height: 400 });
const circle = canvas.addShape('circle', { attrs: { x: 100, y: 100, r: 50, fill: 'red' } });

Event Handling

This feature enables event handling for shapes, allowing you to add interactivity to your graphics.

circle.on('click', () => { console.log('Circle clicked!'); });

Animation

This feature allows you to animate properties of shapes, making your visualizations more dynamic.

circle.animate({ r: 100 }, { duration: 1000, easing: 'easeLinear' });

Other packages similar to @antv/g-canvas

Keywords

FAQs

Package last updated on 15 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc