English | [简体中文](./README.md)

G2Plot

A charting library based on the Grammar of Graphics. [![Version](https://badgen.net/npm/v/@antv/g2plot)](https://npmjs.com/@antv/g2plot) [![NPM downloads](https://img.shields.io/npm/dm/@antv/g2plot.svg)](https://npmjs.com/@antv/g2plot) ![Latest commit](https://badgen.net/github/last-commit/antvis/G2Plot) [![build Status](https://github.com/antvis/G2Plot/workflows/build/badge.svg?branch=master)](https://github.com/antvis/G2Plot/actions?query=workflow%3Abuild) [![coverage](https://img.shields.io/coveralls/antvis/G2Plot/master.svg)](https://coveralls.io/github/antvis/G2Plot) [![Percentage of issues still open](http://isitmaintained.com/badge/open/antvis/g2plot.svg)](http://isitmaintained.com/project/antvis/g2plot "Percentage of issues still open") [![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/antvis/g2plot.svg)](http://isitmaintained.com/project/antvis/g2plot "Average time to resolve an issue")

WebsiteQuick StartBlogAntV ThemeSet

G2Plot is an interactive and responsive charting library. Based on [the grammar of graphics](https://github.com/antvis/g2), you can easily make superior statistical charts through a few lines of code.

## ✨ Features ### 📦 Pretty & Lightweight With [AntV](https://antv.vision/en) 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 ```bash $ npm install @antv/g2plot ``` ## 🔨 Usage ```html
``` ```ts 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('container', { data, xField: 'sales', yField: 'year', seriesField: 'year', }); bar.render(); ``` ## 🤝 How to Contribute Your contributions are always welcome! Please Do have a look at the [issues](https://github.com/antvis/g2plot/issues) first. To become a contributor, please follow our [contributing guide](https://github.com/antvis/g2plot/blob/master/CONTRIBUTING.md). Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

Visiky

💻

hustcc

💻

Joel Alan

💻

刘珍莹

💻

zqlu

💻

arcsin1

💻

被雨水过滤的空气

💻

banli

💻

xi li

💻

DarrenPei

💻

MiniPear

💻

connono

💻

于向前

💻

afc163

💻

Martin Jul

💻

jhwong

💻

Jingsong Gao

💻

Mr小刘

💻

ntscshen

💻

yiminanci

💻

ai-qing-hai

💻

xrkffgg

💻

Dawnlck

💻

Karis

💻

Mayne

💻

Plortinus

💻

Shanjie Chen

💻

Yang Libin

💻

beewolf233

💻

lqzhgood

💻

neoddish

💻

stack-stark

💻

vector

💻

嘤嘤嘤

💻

琚致远

💻

14

💻
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! ## 📧 Contact us 钉钉群组号码: 30233731 ## 🔗 Links [ChartCube](https://chartcube.alipay.com/) - Online chart making tool based on G2Plot. ## License MIT