villebro opened a new pull request #16045:
URL: https://github.com/apache/superset/pull/16045


   ### SUMMARY
   This PR adds a new conditional formatting type to the pivot table viz that 
automatically infers the lower and upper bounds of the color scale. In addition 
a db migration migrates heatmap coloring from the previous version of the Pivot 
Table V2 chart to the new conditional formatting control. This is done by 
applying conditional formatting on all metrics with red scale using the new 
`None` operator (infer cutoff and extreme value from cell values). While this 
does not provide a 1-1 feature mapping to the previous version of the plugin, 
it's the closest match that is possible to be achieved with the new formatting 
control.
   
   TODO: this PR requires the following `superset-ui` PRs to function properly:
   - https://github.com/apache-superset/superset-ui/pull/1264
   - Removal of conditional formatting from subtotals (forthcoming)
   - Renaming of control titles to "conditional formatting" (forthcoming)
   
   ### BEFORE
   Before the removal of the heatmap feature, the Pivot Table v2 chart provided 
six different conditional formatting options; heatmap and bar across all, row 
and column values:
   <img width="1713" alt="Screenshot 2021-08-03 at 14 45 55" 
src="https://user-images.githubusercontent.com/33317356/128039411-4b2775a7-2bca-413d-a230-80721b1a0a18.png";>
   
   After the introduction of the new conditional formatting feature, those 
charts lost their coloring:
   
![image](https://user-images.githubusercontent.com/33317356/128040192-7ff27bce-65e6-4a2d-837f-f30b57eae4aa.png)
   
   ### AFTER
   After the migration the charts will display colored cells again. There is 
currently a bug of sorts in the conditional formatting implementation that 
applies conditional formatting to the subtotals. This will be removed in a 
forthcoming version. As can be seen, the bar option has been removed, along 
with row/column orientations (now formatting is always done per metric).
   
   
![image](https://user-images.githubusercontent.com/33317356/128040406-782c350e-86fa-43a8-9214-728b7a42d1f6.png)
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to