Skip to content
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

fix(table-chart): don't color empty cells in table chart with color formatters #21501

Merged
merged 2 commits into from Sep 28, 2022

Conversation

mayurnewase
Copy link
Contributor

@mayurnewase mayurnewase commented Sep 17, 2022

SUMMARY

If cell value is null don't color it in table chart with conditional formatting, will fix pivot table later if it has similar issue.
fixes: #21341

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screenshot from 2022-09-17 14-47-47

After:

Screenshot from 2022-09-17 14-48-23

TESTING INSTRUCTIONS

  1. create virtual dataset with following query
    SELECT 34523.323 as gmv, 24523.323 as fm, '1' as shem, '1' as gr UNION all SELECT 325323543.323 as gmv, 125323543.323 as fm, '2' as shem, '1' as gr UNION all SELECT null as gmv, 4764545.323 as fm, '3' as shem, '2' as gr UNION all SELECT -10 as gmv, 35254525.323 as fm, '4' as shem, '2' as gr

  2. create table chart with raw records, and from the customize tab set the conditional color formatter on columngmv with condition < 1

  3. test only colored cell is -10 in gmv column.

ADDITIONAL INFORMATION

  • Has associated issue: Table chart: Conditional formatting assigns color to N/A values #21341
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Sep 17, 2022

Codecov Report

Merging #21501 (e4cf266) into master (6e8cad3) will increase coverage by 0.14%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master   #21501      +/-   ##
==========================================
+ Coverage   66.59%   66.74%   +0.14%     
==========================================
  Files        1791     1793       +2     
  Lines       68554    68450     -104     
  Branches     7319     7276      -43     
==========================================
+ Hits        45653    45685      +32     
+ Misses      21008    20890     -118     
+ Partials     1893     1875      -18     
Flag Coverage Δ
javascript 53.01% <100.00%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tend/plugins/plugin-chart-table/src/TableChart.tsx 45.08% <100.00%> (+4.62%) ⬆️
.../legacy-plugin-chart-histogram/src/controlPanel.ts 40.00% <0.00%> (-10.00%) ⬇️
superset-frontend/src/hooks/apiResources/tables.ts 80.00% <0.00%> (-1.25%) ⬇️
...gin-chart-echarts/src/Timeseries/transformProps.ts 52.38% <0.00%> (-1.20%) ⬇️
...rontend/src/visualizations/FilterBox/FilterBox.jsx 49.61% <0.00%> (ø)
.../src/dashboard/components/RefreshIntervalModal.tsx 80.00% <0.00%> (ø)
.../plugin-chart-echarts/src/Timeseries/buildQuery.ts 66.66% <0.00%> (ø)
.../superset-ui-core/src/query/normalizeTimeColumn.ts 100.00% <0.00%> (ø)
...e/components/controls/SelectAsyncControl/index.tsx 54.83% <0.00%> (ø)
...et-ui-chart-controls/src/operators/sortOperator.ts 100.00% <0.00%> (ø)
... and 35 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mayurnewase mayurnewase changed the title fix: don't color empty cells in table chart with color formatters fix(table-chart): don't color empty cells in table chart with color formatters Sep 24, 2022
Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zhaoyongjie zhaoyongjie merged commit 60bab42 into apache:master Sep 28, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table chart: Conditional formatting assigns color to N/A values
3 participants