-
Notifications
You must be signed in to change notification settings - Fork 13.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: conditional coloring for big number chart #23064
feat: conditional coloring for big number chart #23064
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23064 +/- ##
==========================================
- Coverage 67.47% 66.28% -1.19%
==========================================
Files 1880 1922 +42
Lines 72283 74068 +1785
Branches 7881 8115 +234
==========================================
+ Hits 48772 49098 +326
- Misses 21486 22895 +1409
- Partials 2025 2075 +50
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 478 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/testenv up |
@rusackas Ephemeral environment spinning up at http://34.222.110.51:8080. Credentials are |
superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/controlPanel.ts
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-chart-controls/test/utils/getColorFormatters.test.ts
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/controlPanel.ts
Show resolved
Hide resolved
Code looks good, and it seems to work well on the ephemeral environment. The only question I have is whether it's possible/reasonable to make the colors full opacity rather than the sort of pastel colors that they are now. I'm a little worried about contrast/legibility in particular. |
Very useful improvement. It would be great if this was available across the Big Number and Big Number with trend line. Some additional improvements to functionality could be:
This probably applies to the conditional formatting on the table chart too. - |
@gbusch curious about your input on any of the above comments... would love to see this PR get through! :) |
Sorry, was busy and then almost forgot about it... Colors are defined in this file: I renamed the colors to make it clearer that they refer to the theme colors and added possibility for darker colors (from theme). Does this make sense? |
@rusackas What do you think? |
The E2E tests are sometimes flaky... I restarted the CI, hopefully it passes this time |
Big Numbers doesn't get color formatted when its value is zero. Anyone else experience this? If I set a rule for "error when < 5" and the value is 0, nothing happens. If the value is 0.0001 then it colors. |
Would you be willing to open a PR or an Issue about this? We haven't heard much outcry, and would love any help you can provide to set it on a course toward resolution. |
SUMMARY
As suggested here: #21820
allow for conditional formatting (coloring) of Big Number charts.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION
re-uses existing "ConditionalFormattingControl" from chart table and pivot table