**[Pivot Table] Conditional formatting coloring anomaly in same column & Request for Row label truncation
- Dominant language
- Python
- Stars
- 74.8k
- Forks
- 18.3k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 685
Description
### Bug description
### Environment
- Apache Superset version: 6.1.0
- Chart Type: Pivot Table (v2)
### Summary
This issue addresses two key rendering and usability concerns in the Pivot Table visualization:
1. [Bug] Conditional formatting renders inconsistent or abnormal background colors within the same column.
2. [Feature Request] Need for text truncation (ellipsis) support on Row dimension fields with long text.
---
### Issue 1: Conditional Formatting Anomaly in Same Column (Bug)
* **Description**: When applying conditional formatting rules (e.g., color scales or threshold ranges) to a metric column in a Pivot Table, the rendered background colors across cells within the same column are occasionally inconsistent or abnormal relative to their numeric values.
* **Expected Behavior**: Color scales should linearly reflect the cell values relative to the rest of the column based on the set rule.
* **Actual Behavior**: Certain cells display background colors that do not align with their relative value ordering (e.g., a smaller value receiving a darker background than a larger value).
---
### Issue 2: Support Text Truncation for Row Dimension Fields (Feature Request)
* **Description**: When row dimension fields contain long string values, the table column stretches excessively, causing visual clutter, poor readability, and unnecessary horizontal scrolling.
* **Proposed Solution**:
- Add a chart control setting to truncate long text in Row labels using an ellipsis (...), with a configurable max-width or character limit.
- Provide a hover tooltip displaying the full unabbreviated text when a row label is truncated.
---
### Steps to Reproduce
1. Create a Pivot Table (v2) chart in Superset 6.1.0 using a dataset with long text row dimension values.
2. Apply Conditional Formatting to a metric column.
3. Observe that conditional colors do not map strictly to value magnitudes in the column, and long row labels expand the table without truncation.**
* **Standard Format**: Structured according to standard open-source GitHub Issue guidelines, clearly separating the bug report from the feature request with reproduction steps.
* **Terminology Alignment**: Uses official Superset chart terms (*Pivot Table v2*, *Row Dimensions*, *Conditional Formatting*) to ensure project maintainers can quickly triage the issue.
* **GitHub Tip**: If the maintainers request separate submissions, you can easily split this draft into two distinct posts—one under the Bug template and one under the Feature Request template.
### Screenshots/recordings
### 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
Research direction
Start by reproducing the issue in a Superset Pivot Table (v2) with long row-dimension values and conditional formatting, following the listed steps. Inspect the Pivot Table v2 entry point; done requires colors that match value ordering and configurable ellipsis truncation with a tooltip for full row labels.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, python
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100