Why Modern Data Visualization Demands Declarative Engineering: Insights from AntV G2 & AVA
This article examines how rising analysis demands are reshaping enterprise data visualization, presenting three engineering challenges, a concrete case study of enhanced line charts, the shift toward declarative syntax, and emerging trends such as treating visualizations as data, improving analysis communication, and deepening automation.
Higher Requirements for Visualization Engineering
Traditional BI tools focused on data display, but growing analysis needs demand richer capabilities beyond simple charts, exposing limitations in existing visualization infrastructure.
First, analysis needs increase technical layering, reducing flexibility due to multi‑level encapsulation. Base chart libraries offer generic features, forcing custom components and additional layers for interaction, tooltips, and business‑specific logic, leading to complex development and reuse challenges.
Second, analysis introduces more graphic elements, making chart enhancement cumbersome. Adding highlights, trend lines, arrows, or text requires irregular, custom graphics that are harder to develop and layout.
Third, analysis produces conclusions that must be presented clearly. Different insight types need appropriate design standards, textual explanations, and suitable visual or interactive forms.
A Concrete Engineering Case
At Ant Group, we built a chart asset library on the AntV/G2 stack to serve many data‑analysis scenarios. A “small” request to create an enhanced line chart with deviation bands, baselines, and anomaly points illustrates the challenges.
Two implementation options exist:
Use chart annotations to overlay enhanced information on the original line chart.
Create a multi‑layer chart by stacking line and area charts, assigning each layer to specific data (actual values, baseline, anomalies, deviation band).
Option 1 is straightforward but in G2 4.x annotations are limited (“second‑class citizens”), lacking data binding, custom shapes, legends, and tooltips, reducing extensibility.
Option 2 requires replacing the original component, risking large changes and coordination overhead across teams.
G2 5.0 introduces a declarative
Specand custom
Mark, treating annotations and geometry uniformly as first‑class citizens, enabling flexible multi‑layer composition and easier reuse.
Visualization Based on Declarative Syntax
Declarative programming describes *what* the result should look like, leaving *how* to the engine. For visualization, this aligns with the focus on results and data, improving development efficiency, readability, reusability, and enabling static specifications that can be stored, transferred, and transformed.
Historical examples include ECharts’ configuration objects, Vega/Vega‑Lite’s declarative grammars, and the shift in G2 v5 where the underlying API remains imperative but maps to a declarative
Specification.
Heer & Bostock, 2010; Li et al., 2018; Satyanarayan et al., 2016
Treating Visualization as Data
Viewing visualizations as data enables operations such as transformation, assessment, comparison, querying, reasoning, recommendation, and mining. AI4VIS surveys these directions, highlighting challenges like reverse‑engineering charts from images and embedding information via visual watermarks (VisCode).
Effective visualization instances should encapsulate three structures: data model, presentation specification, and insight information.
Research on computable visualizations demonstrates chart arithmetic (e.g., adding bar charts) and other applications.
Wu et al., 2021; Zhang et al., 2020; Wu et al., 2022
Prioritizing Analysis Communication Convenience
Analysis tools should be user‑friendly, machine‑friendly, and collaborative. Enhancements include flexible interactions, richer chart types, better annotation standards, API friendliness, version control, and collaborative editing supported by declarative specifications.
Moving Toward Deeper Automation
Automation reduces configuration friction by auto‑recommending charts, auto‑configuring layouts, and providing intelligent insights. AVA offers front‑end chart recommendation based on selected data, while broader AI‑driven analysis can suggest insights, alerts, and automated workflows.
In the era of large language models, visual question answering and automated insight generation become feasible.
AntV continues to push the frontier of visualization theory and practice; G2 5.0 and AVA 3.0 are now publicly released for experimentation and contribution.
Alipay Experience Technology
Exploring ultimate user experience and best engineering practices
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.