Bug description

Users can choose the X for increase, Y for decrease color scheme option on the Table Chart. However, it does not work.

Reproduction

  1. Create a virtual dataset with query
SELECT
  1 AS X,
  2 AS Y,
  1 - 2 AS "X-Y"
UNION ALL
SELECT
  5 AS X,
  2 AS Y,
  5 - 2 AS "X-Y"
UNION ALL
SELECT
  4 AS X,
  2 AS Y,
  4 - 2 AS "X-Y"
UNION ALL
SELECT
  1 AS X,
  5 AS Y,
  1 - 5 AS "X-Y"
UNION ALL
SELECT
  1 AS X,
  1 AS Y,
  1 - 1 AS "X-Y";
  1. Create a table chart with this dataset
  2. Go to the Customize tab, and add Conditional Formatting to the third column.
  3. Choose the Green for increase, red for decrease option.

Expected results

The "Green for increase, red for decrease" and "Red for increase, green for decrease" conditional formatting options shouldn't appear unless there is a time shift applied to the table

Actual results

The Conditional Formatting for the X for increase, Y for decrease does not work.

Screenshots/recordings

Image

Superset version

master / latest-dev

Python version

3.11

Node version

18 or greater

Browser

Firefox

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] 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.

Comment From: dosubot[bot]

This is a known UX gap: the "Green for increase, red for decrease" (and similar) conditional formatting options in Table Chart only work when a time comparison (time shift) is active. The code for built-in comparison color schemes hides these options unless a time shift is set, but the custom conditional formatting control still lets you select them even when no time comparison is present. As a result, picking these options without a time shift has no effect—they are ignored by the chart logic, which expects a comparison column to be available for the increase/decrease calculation. This can be confusing, since the UI allows the selection but nothing happens.

There is currently no documentation or warning in the UI about this behavior. The control panel should ideally restrict or warn about these options when no time shift is set, since they will never have an effect in that case. This is a UI/UX issue, not a backend bug. For reference, see the relevant code and logic in the Table Chart controls and transformProps files:
controlPanel.tsx
transformProps.ts

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Join Discord Share on X