apache / apache/superset

Freeze top-left header intersection in Pivot Table charts via CSS/JS sticky positioning

Open
#43,352 3 comments 0 reactions 0 assignees View on GitHub
enhancement:request viz:charts:pivot 🦾 ai-candidate
Dominant language
Python
Stars
74.8k
Forks
18.3k
Avg merge
2d 5h
Merged PRs (30d)
685

Description

### Bug description

### **Problem Statement**

When interacting with large Pivot Tables in Superset, horizontal and vertical scrolling causes the top-left intersection header area (which defines the column/row structure context) to scroll out of view. This makes it difficult to maintain context regarding what data is currently displayed, especially across large datasets requiring wide/long scrolling.

### **Proposed Solution**

Implement sticky positioning using CSS (e.g., `position: sticky`, `z-index`, `top`, `left` rules) or a lightweight JavaScript solution within the Pivot Table (v2) chart visualization plugin.

Specifically:

* **Top-left intersection cell(s):** Stick to both `top: 0` and `left: 0` with a higher `z-index` so they remain visible during both horizontal and vertical scrolling.
* **Column headers (``):** Stick to `top: 0` during vertical scrolling.
* **Row headers / First column(s):** Stick to `left: 0` during horizontal scrolling.

### **Use Case / Value**

* **Enhanced UX & Usability:** Users can continuously track context when navigating large Pivot Tables without repeatedly scrolling back to the top-left corner.
* **Standardized Data Exploration:** Aligns Superset's Pivot Table experience with standard spreadsheet tools (e.g., Excel/Google Sheets freeze panes).

### **Environment Information**

* **Superset Version:** 6.1.0
* **Visualization:** Pivot Table / Pivot Table v2

---

### Screenshots/recordings

_No response_

### Superset version

master / latest-dev

### Python version

3.11

### Node version

16

### Browser

Chrome

### Additional context

_No response_

### Checklist

- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Contributor guide

Open the contributing guide

Research direction

Start in the Pivot Table (v2) chart visualization plugin and inspect how its table headers and scrolling are rendered. Verify the top-left intersection remains visible during both scroll directions, column headers remain visible vertically, and row headers remain visible horizontally in large Pivot Tables.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.