G2 is a declarative data visualization engine that constructs complex charts and graphical representations by mapping raw data to visual elements through a systematic grammar of graphics. It functions as a modular framework for building custom analytical visualizations, allowing users to define visual encodings and coordinate systems independently of the underlying data.
The library distinguishes itself through a multi-backend rendering pipeline that supports Canvas, SVG, and WebGL, ensuring consistent graphical performance across different environments. Its architecture relies on a plugin-based system that enables the integration of custom scales, geometric marks, and statistical transforms, providing the flexibility required for specialized analytical needs.
Beyond standard charting, the framework supports the construction of interactive dashboards and the visualization of multi-dimensional or hierarchical datasets. It includes built-in capabilities for generating advanced statistical representations, such as heatmaps, violin plots, and vector fields, while maintaining a declarative approach to component composition and data-driven state transitions.