bito-code-review[bot] commented on PR #43457:
URL: https://github.com/apache/superset/pull/43457#issuecomment-5395028999

   <!-- Bito Reply -->
   The flagged issue is correct. Including calculation-only denominator records 
in the color scale calibration causes the min/max range to be skewed by hidden 
values, leading to incorrect conditional coloring for visible cells. To resolve 
this, you should filter `allLevelRecords` to include only those levels that are 
actually rendered in the pivot table before passing them to 
`getColorFormatters`.
   
   
**superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/transformProps.ts**
   ```
   const allLevelRecords = data
       .filter(level => level.isRendered) // Assuming an isRendered property 
exists or can be derived
       .flatMap(level => level.data);
     const metricColorFormatters = getColorFormatters(
       pivotConditionalFormatting,
       allLevelRecords,
       theme,
     );
   ```


-- 
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