Coder Social home page Coder Social logo

lmm1990 / g2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antvis/g2

0.0 0.0 0.0 190.04 MB

πŸ“Š The Grammar of Graphics in JavaScript

Home Page: https://g2.antv.vision

License: MIT License

JavaScript 97.57% TypeScript 1.92% CSS 0.23% HTML 0.28%

g2's Introduction

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.

g2's People

Contributors

leungwensen avatar simaq avatar dxq613 avatar elaine1234 avatar xile611 avatar hustcc avatar paleface001 avatar afc163 avatar leannechn avatar guisturdy avatar chenshuai2144 avatar maplor avatar frezc avatar dengfuping avatar weepy3641 avatar zhfanrui avatar xudafeng avatar wangyu-kelly avatar wensen-lws avatar huxiaoyun avatar liximomo avatar sai0514 avatar parryqiu avatar teammiclee avatar janjakubnanista avatar ascoders avatar dickeylth avatar x22x22 avatar troy351 avatar laispace avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.