Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
@antv/g2
Advanced tools
Changelog
5.1.10 (2023-11-28)
nodePaddingRatio
in chord nodes using a hack method (#5824) (b0b37af)Readme
English | 简体中文
G2 is named after Leland Wilkinson’s book The Grammar of Graphics and was profoundly inspired by it in the very beginning. Here are some resources you can begin with:
G2 is usually installed via a package manager such as npm or Yarn.
$ npm install @antv/g2
$ yarn add @antv/g2
The Chart object then can be imported from G2.
<div id="container"></div>
import { Chart } from '@antv/g2';
// A tabular data to be visualized.
const data = [
{ genre: 'Sports', sold: 275 },
{ genre: 'Strategy', sold: 115 },
{ genre: 'Action', sold: 120 },
{ genre: 'Shooter', sold: 350 },
{ genre: 'Other', sold: 150 },
];
// Instantiate a new chart.
const chart = new Chart({
container: 'container',
});
// Specify visualization.
chart
.interval() // Create an interval mark and add it to the chart.
.data(data) // Bind data for this mark.
.encode('x', 'genre') // Assign genre column to x position channel.
.encode('y', 'sold') // Assign sold column to y position channel.
.encode('color', 'genre'); // Assign genre column to color channel.
// Render visualization.
chart.render();
If all goes well, you can get the following lovely bar chart!
MIT@AntV.
FAQs
the Grammar of Graphics in Javascript
The npm package @antv/g2 receives a total of 142,718 weekly downloads. As such, @antv/g2 popularity was classified as popular.
We found that @antv/g2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.