Skip to content

[SIP] Proposal for Adding AntV S2 based Pivot table #38586

@krmmkr

Description

@krmmkr

[SIP] Proposal for Adding Table Chart based on AntV S2

Motivation

The Table and Pivot Table charts are one of the heavily utilized visualizations in Apache Superset. While the introduction of Table V2 (based on ag-Grid) brought significant improvements to the standard table, the Pivot Table experience still lags behind.

The primary motivations for this proposal are:

Licensing and Feature Paywalls: Some of the most powerful ag-Grid features (like advanced pivoting, tree data, and rich aggregations) belong to the ag-Grid Enterprise edition. This paywall severely restricts the Superset community from implementing advanced table features.

Inferior Pivot Table Layout: The current Pivot Table's layout is visually dated and functionally restrictive compared to the ag-Grid-powered table.

Missing Sorting in Pivot Tables: The existing Pivot Table implementation does not allow users to intuitively sort rows or columns by metric values.

Lack of Native Rowspan when considering grid based table: The current Table / Table V2 plugins do not natively support rowspan functionality which makes visualizing hierarchical or grouped data visually redundant and harder for users to parse at a glance.

Inaccurate Aggregations for Totals: The current Pivot Table struggles with accurate summary aggregations, specifically regarding true count distincts. For example, if an email address appears across two different dimensions, the grand total should reflect a COUNT(DISTINCT) of 1. Currently, calculating true totals and subtotals natively requires workarounds or yields inaccurate sums of sums.

Proposed Change

Introduce AntV S2 (SpreadSheet) as a new, premium alternative option for Pivot Table charts. AntV S2 is an open-source, data-driven multi-dimensional analysis spreadsheet component that addresses the current limitations natively.

New or Changed Public Interfaces

Models & Endpoints: No backend changes to models, views, or REST endpoints are required.

Visualizations: Introduction of a new frontend visualization plugin package (e.g., @superset-ui/plugin-chart-antv-s2).

React Components: New UI components will be added to the chart control panel to expose S2-specific configurations (e.g., Grid/Tree layout modes, advanced subtotals, and canvas theme settings).

CLI & Deployment: No changes or impact on the Superset CLI or deployment workflows.

New dependencies

@antv/s2: The core multi-dimensional canvas rendering engine.
@antv/s2-react: The official React component wrapper for the S2 engine.
Maintenance Status: Both packages are highly active, frequently updated, and backed by Ant Group.
License: Both are published under the MIT License, making them fully compatible with Superset’s Apache 2.0 open-source licensing.

Migration Plan and Compatibility

The AntV S2 components will be introduced as entirely new visualization plugin - AntV Pivot Table. They will live alongside the legacy Table / Table V2 (ag-Grid), and probably can replace classic Pivot Table chart sometime later.
Because this is an additive change, there are no immediate database migrations, script updates, or URL routing changes required. Existing dashboards and saved charts will remain completely untouched, allowing users to opt-in and transition to the S2 charts at their own pace.
Organizations that have already invested in ag-Grid Enterprise licenses and integrated them into their Superset deployments can continue utilizing those features.

Metadata

Metadata

Assignees

No one assigned

    Labels

    design:proposalDesign proposalssipSuperset Improvement Proposalviz:charts:pivotRelated to the Pivot Table charts

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions