Gathering detailed insights and metrics for @antv/g2
Gathering detailed insights and metrics for @antv/g2
📊 The concise and progressive visualization grammar.
npm install @antv/g2
Typescript
Module System
Node Version
NPM Version
TypeScript (83.79%)
HTML (12.11%)
JavaScript (2.56%)
CSS (1.43%)
Less (0.11%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
28,706,985
Last Day
31,742
Last Week
166,096
Last Month
710,405
Last Year
7,373,874
MIT License
12,216 Stars
4,803 Commits
1,605 Forks
248 Watchers
22 Branches
214 Contributors
Updated on Mar 14, 2025
Minified
Minified + Gzipped
Latest Version
5.2.11
Package Id
@antv/g2@5.2.11
Unpacked Size
7.36 MB
Size
1.45 MB
File Count
2,925
NPM Version
10.8.1
Node Version
22.4.0
Published on
Feb 11, 2025
Cumulative downloads
Total Downloads
Last Day
8.9%
31,742
Compared to previous day
Last Week
2%
166,096
Compared to previous week
Last Month
18%
710,405
Compared to previous month
Last Year
2%
7,373,874
Compared to previous year
12
47
English | 简体中文
G2 起源于 Leland Wilkinson 的图形语法:《The Grammar of Graphics》,但又不止于图形语法。
可以通过 NPM 或 Yarn 等包管理器来安装。
1$ npm install @antv/g2
1$ yarn add @antv/g2
成功安装之后,可以通过 import 导入 Chart 对象。
1<div id="container"></div>
1import { Chart } from '@antv/g2'; 2 3// 准备数据 4const data = [ 5 { genre: 'Sports', sold: 275 }, 6 { genre: 'Strategy', sold: 115 }, 7 { genre: 'Action', sold: 120 }, 8 { genre: 'Shooter', sold: 350 }, 9 { genre: 'Other', sold: 150 }, 10]; 11 12// 初始化图表实例 13const chart = new Chart({ 14 container: 'container', 15}); 16 17// 声明可视化 18chart 19 .interval() // 创建一个 Interval 标记 20 .data(data) // 绑定数据 21 .encode('x', 'genre') // 编码 x 通道 22 .encode('y', 'sold') // 编码 y 通道 23 .encode('color', 'genre'); // 编码 color 通道 24 25// 渲染可视化 26chart.render();
如果一切顺利,你可以得到下面的柱状图!
MIT@AntV.
No vulnerabilities found.
Reason
23 commit(s) and 12 issue activity found in the last 90 days -- score normalized to 10
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More