Skip to content
🍡 An interactive and responsive charting library based on the grammar of graphics.
TypeScript JavaScript
Branch: master
Clone or download
Latest commit 6f73e29 Dec 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows chore: use both GITHUB_TOKEN and ACCESS_TOKEN for gh-page push action Dec 4, 2019
__tests__ fix: package.json Dec 5, 2019
demos feat: lint and prettier demos & tests Nov 13, 2019
docs/manual fix: resolve conflict Dec 5, 2019
examples chore: update progress api in example Dec 5, 2019
scripts fix: 修复types 冲突 Nov 11, 2019
site fix: homepage link Nov 28, 2019
src fix: progress mouseleave event in x dir Dec 6, 2019
.commitlintrc.js feat(changelog): add commit-msg and changelog generator Nov 21, 2019
.editorconfig chore(*): 迁移仓库 Aug 22, 2019
.eslintrc feat: lint工具使用eslint Nov 13, 2019
.gitignore feat: demos都改成ts版本,方便验证types Nov 9, 2019
.prettierrc chore: update site & readme Nov 22, 2019
CHANGELOG.md chore: update changelog Dec 6, 2019
CONTRIBUTING.md docs: markdown format Nov 15, 2019
CONTRIBUTING.zh-CN.md docs: markdown format Nov 15, 2019
LICENSE add examples prettier Nov 7, 2019
README.md chore: update readme Dec 5, 2019
README.zh-CN.md chore: update reame.cn Dec 5, 2019
gatsby-browser.js add advanced demos Nov 16, 2019
gatsby-config.js 🚀 g2plot.antv.vision Nov 21, 2019
global.d.ts chore: use jest-electron for unit test Nov 12, 2019
package.json chore: update version 0.11.3 => 0.11.4 Dec 6, 2019
tsconfig.json fix: export declaration file Dec 6, 2019
webpack-dev.config.js feat: demos都改成ts版本,方便验证types Nov 9, 2019
webpack.config.js feat: support slider for line chart Sep 26, 2019

README.md

English | 简体中文

G2Plot

A charting library based on the Grammar of Graphics.

Version NPM downloads Latest commit

G2Plot is an interactive and responsive charting library. Based on the grammar of graphics, you can easily make superior statistical charts through a few lines of code.


Features

Pretty & Lightweight

With AntV design principles of data visualization, G2Plot provides standard and elegant visual styles as well as neat config options.

Responsive

G2Plot guarantees the readability of the charts in different sizes and data.

Storytelling

With the feature of layers, charts can be grouped, nested or linked to do exploratory analysis and expressive storytelling.

Installation

$ npm install @antv/g2plot

Usage

<div id="container"></div>
import { Bar } from '@antv/g2plot';

const data = [
  { year: '1951 年', sales: 38 },
  { year: '1952 年', sales: 52 },
  { year: '1956 年', sales: 61 },
  { year: '1957 年', sales: 145 },
  { year: '1958 年', sales: 48 },
];

const bar = new Bar(document.getElementById('container'), {
  data,
  xField: 'sales',
  yField: 'year',
  colorField: 'year',
});

bar.render();

Contributing

Your contributions are always welcome! Please Do have a look at the issues first.

To become a contributor, please follow our contributing guide.

License

MIT

Links

ChartCube - Online chart making tool based on G2Plot.

You can’t perform that action at this time.