apache / apache/superset

[SIP-205] Proposal for Adding AntV S2 based Pivot table

Open
#38,586 4 comments 1 reaction 0 assignees View on GitHub
design:proposal extension-candidate sip viz:charts:pivot
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 5h
Merged PRs (30d)
685

Description

## [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.

Contributor guide

Open the contributing guide

Research direction

No implementation files or tests are named. Start by reviewing the proposed @superset-ui/plugin-chart-antv-s2 package and the existing Table/Pivot Table visualization plugins, then assess how @antv/s2 and @antv/s2-react would expose the listed controls. Done means a new AntV Pivot Table visualization can coexist with the legacy charts and provide the proposed S2 configuration options.

Written by the indexing model from the issue text.

Assessment

Tech stack
react
Domain
data-visualization, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.