Skip to content
📊 The Grammar of Graphics in JavaScript
JavaScript TypeScript Other
Branch: master
Clone or download
Latest commit 3140243 Feb 14, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: update issue and pull request template Sep 24, 2019
bin refactor(program) Use other ES6 features for confomity Mar 14, 2019
bundler refactor(program) Use other ES6 features for confomity Mar 14, 2019
demos Merge pull request #1218 from kale-code/kale-js-updates Sep 25, 2019
docs chore: 修复错误的代码标识 Jan 7, 2020
examples chore: 移除不必要的配置 Feb 2, 2020
site Update index.zh.tsx Feb 12, 2020
src chore: release 3.5.12 Feb 15, 2020
test Merge pull request #1603 from antvis/fix-brush Nov 19, 2019
.babelrc.js fix: corejs 2 and corejs 3 build conflict Nov 22, 2019
.editorconfig init Jun 5, 2017
.eslintignore docs: adjust docs folder structure Nov 7, 2019
.eslintrc chore(dev): no console.log Mar 9, 2018
.gitignore docs: fix gatsby-theme-antv Nov 7, 2019
.npmignore chore: update .npmignore Nov 20, 2019
.torch.compile.opts.js fix(dev): upgrade babel preset env for torchjs Sep 6, 2018
.travis.yml fix: fix bug of electron about libgconf-2.so.4 Aug 8, 2019
CHANGELOG.md 🚀 g2.antv.vision Nov 21, 2019
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md Sep 19, 2018
CONTRIBUTING.md docs: fix typos Dec 20, 2017
CONTRIBUTING.zh-CN.md chore: how to contribute. Nov 23, 2017
LICENSE update Nov 20, 2017
README.md chore: remove unused info Dec 10, 2019
README.zh-CN.md chore: remove unused info Dec 10, 2019
gatsby-browser.js chore: remove unnecessary insert-css Nov 15, 2019
gatsby-config.js docs: fix examples 404 Dec 26, 2019
package.json chore: release 3.5.12 Feb 15, 2020
tsconfig.json chore(util): Added tslint npm command that validates src/index.d.ts f… Jun 26, 2018
tslint.json chore(util): Added tslint npm command that validates src/index.d.ts f… Jun 26, 2018
webpack-dev.config.js packing Aug 1, 2017
webpack.config.js chore(dev): support svg version Jul 4, 2018

README.md

G2: The Grammar of Graphics in JavaScript

NPM Package NPM Downloads Percentage of issues still open

中文 README

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.

Installation

$ npm install @antv/g2

Usage

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

const data = [
  { genre: 'Sports', sold: 275 },
  { genre: 'Strategy', sold: 1150 },
  { genre: 'Action', sold: 120 },
  { genre: 'Shooter', sold: 350 },
  { genre: 'Other', sold: 150 },
];

const chart = new G2.Chart({
  container: 'c1',
  width: 500,
  height: 500
});

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

More examples

Development

$ npm install

# run test case
$ npm run test-live

# build watching file changes and run demos
$ npm run dev

# run demos
$ npm 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.

Contributors


leungwensen


simaQ


dxq613


elaine1234


guisturdy


paleface001


chenshuai2144


xile611


maplor


zhfanrui


Frezc


Leannechn


janjakubnanista


ParryQiu


Sai0514


liximomo


wensen-lws


xudafeng


wangyu-kelly


BlackGanglion


illumen


DanielRuf


huacnlee


0nza1101


RaoHai


tbroadley


charleyw


Hazyzh


forbreak


nekocode

This project follows the git-contributor spec, auto updated at Sat Jul 27 2019 14:06:08 GMT+0800.

You can’t perform that action at this time.