AntV G2 3.2 Release: New Visual Enhancements, Tail‑Legend, RegionFilter Guide, Data Marker Guides, Flexible Component Configurations, and Chart‑Level Themes
The G2 3.2 release from AntV introduces a richer visual cognition system with tail‑legend support, region‑filter color guides, new data marker guides, more flexible component configurations, and chart‑level theme customization, while providing installation options via npm or CDN for developers to try the latest features.
G2, a high‑interaction data‑visualization grammar from AntV, announced its 3.2 version, adding numerous visual enhancements such as new auxiliary elements ( guide ), an expanded legend system, refined axis and tooltip details, and the long‑awaited chart‑level theme support.
1. Tail‑legend based on the proximity principle – leveraging Gestalt’s proximity rule, the new tail-legend automatically follows the end of line or area charts, positioning the legend close to its series to strengthen visual association.
2. Breaking color boundaries with region‑filter – the guide().regionFilter API allows color rendering based on data‑space regions, enabling a single graphic to display segmented colors or multiple graphics to share the same color, enriching G2’s color semantics.
3. Data marker guides (point, line, area) – the new guide types guide.dataMarker (point) and guide.dataRegion (line) help highlight peaks, valleys, or anomalies; area‑type guides are planned for G2 3.3.
4. More flexible component configuration Legend positioning expanded from four corners to twelve locations. Axis styles now distinguish continuous and categorical data, preventing misinterpretation in mixed charts. These changes are backward compatible and can be enabled via configuration options.
5. Chart‑level theme support – themes are now collections of configuration items; developers can switch themes globally or per chart, allowing multiple themes within a single application.
The new version is available as the latest @antv/g2 package (3.2.4). Install via npm: npm install @antv/g2 --save or use the CDN link: https://gw.alipayobjects.com/os/antv/pkg/_antv.g2-3.2.4/dist/g2.min.js Community members are encouraged to try the release, star the repository, submit issues, or contribute pull requests.
Additional resources include links to the full AntV suite (G2, F2 for mobile, G6 for relational data) and contact information for recruitment and collaboration.
AntTech
Technology is the core driver of Ant's future creation.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.