antvis/g2

Name: g2

Owner: AntV team

Description: G2 (The Grammar of Graphics)

Created: 2016-05-26 09:21:04.0

Updated: 2018-01-19 19:11:45.0

Pushed: 2018-01-19 08:30:33.0

Homepage: https://antv.alipay.com/zh-cn/g2/3.x/index.html

Size: 51020

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

G2: The Grammar of Graphics in JavaScript

NPM Package NPM Downloads Percentage of issues still open

G2 is a visualization grammar, a data-driven visual language with a high level of usability and scalability. It provides a set of grammars, takes users beyond a limited set of charts to an almost unlimited world of graphical forms. With G2, users can describe the visual appearance of a visualization just by one statement.

Special thanks to Leland Wilkinson, the author of The Grammar Of Graphics, whose book served as the foundation for G2.

More details about G2.

Installation
m install @antv/g2
Usage

 id="c1"></div>
s
rt G2 from '@antv/g2';

t data = [
genre: 'Sports', sold: 275 },
genre: 'Strategy', sold: 1150 },
genre: 'Action', sold: 120 },
genre: 'Shooter', sold: 350 },
genre: 'Other', sold: 150 },


t chart = new G2.Chart({
ntainer: 'c1',
dth: 500,
ight: 500


t.source(data);
t.interval().position('genre*sold').color('genre');
t.render();

More examples

demos

Development
m install

n test case
m run test-live

ild watching file changes and run demos
m run dev

n demos
m run demos
How to Contribute

Please let us know how can we help. Do check out issues for bug reports or suggestions first.

To become a contributor, please follow our contributing guide.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.