talira

AntV's grammar-of-graphics JavaScript library for building charts and dashboards on Canvas, SVG or WebGL

open sourceMITfree

G2 is AntV's visualization grammar for JavaScript, named after Leland Wilkinson's The Grammar of Graphics, for building dashboards, exploring data and telling stories with charts. Instead of a fixed set of chart types it composes marks, transforms, scales, coordinates and compositions through a declarative, functional API, infers sensible defaults so a short declaration gives a meaningful chart, and can declare data-driven animation and interaction. Scales, transforms and marks can all be extended. It renders on Canvas, SVG or WebGL through AntV's G renderer. It installs from npm as @antv/g2. It isn't the G2 software review site.

Problems it solves

  • build interactive charts for a dashboard in JavaScript with a grammar of graphics
  • a chart library that composes marks and scales instead of fixed chart types
  • render large charts on Canvas or WebGL in the browser

Features

  • a grammar of graphics with marks, transforms, scales, coordinates and compositions
  • a declarative API that infers defaults from short declarations
  • data-driven animation and interaction
  • Canvas, SVG or WebGL rendering through AntV's G renderer

Alternatives

The same job

These do what G2 does.

  1. Apache ECharts Open source JavaScript library for interactive charts and visualization
  2. Recharts Composable charting library built from React components on SVG and D3
  3. ApexCharts Interactive SVG charts for the web, free under M revenue
  4. Vega Visualization grammar: describe interactive charts in JSON and render them to Canvas or SVG
  5. Vega-Lite A high-level grammar of interactive graphics
  6. ChartGPU A WebGPU charting library for millions of points and real-time streaming

Compare G2 with the top 3