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

Comment From: LisaHusband

@msyavuz If this issue hasn’t been assigned yet, I’d love to take it on

Comment From: rusackas

I think this was contributed by @amaannawab923 who may have some input here.

Comment From: msyavuz

@LisaHusband https://github.com/apache/superset/issues/34142#issuecomment-3064948823

Comment From: geido


🎉 Preset Bounty Available: $150 USD 🎉

To claim this bounty, please carefully follow the steps below.


📋 Steps to Participate

  1. Review Guidelines:
    Read through the Preset Bounty Program Contribution Guide for complete details on bounty requirements.

  2. Show Your Interest:
    Complete the Preset Bounty Program Survey and comment this issue to express your interest.

  3. Join the Slack Channel:
    After completing the survey, you’ll receive an invitation to the dedicated Apache Superset Slack channel.

  4. Get Assigned:
    To officially start, ensure a Bounty Program Manager has assigned you to this issue.

  5. Submit Your Solution:
    When ready, submit your solution with the Fixes #{issue_number} notation in your Pull Request description.

  6. Claim Your Bounty:
    Sign up at GitPay.me and submit your solution via: https://gitpay.me/#/task/1221


💡 Additional Notes

  • Only developers assigned by a Bounty Program Manager should start working on this issue to win the bounty.
  • Be sure to follow the guide closely to avoid any delays in payment. Please, allow a few days after your PR has been merged for the bounty to be released.

Good luck, and happy coding! 🎉

Comment From: denji932

@msyavuz I would like to work on this.

Comment From: denji932

Hey @msyavuz, if @denji932 isn't available, I'd like to work on fixing this issue.

I am working on it.