codeant-ai-for-open-source[bot] commented on code in PR #44665:
URL: https://github.com/apache/superset/pull/44665#discussion_r4409352065


##########
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx:
##########
@@ -1195,29 +1244,38 @@ export default function TableChart<D extends DataRecord 
= DataRecord>(
             top: 0;
             ${
               valueRange &&
-              typeof value === 'number' &&
+              numericValue !== undefined &&
               valueRangeFlag &&
               `
                 width: ${`${cellWidth({
-                  value: value as number,
+                  value: numericValue,
                   valueRange,
                   alignPositiveNegative,
                 })}%`};
                 left: ${`${cellOffset({
-                  value: value as number,
+                  value: numericValue,
                   valueRange,
                   alignPositiveNegative,
                 })}%`};
                 background-color: ${
                   backgroundColorCellBar ||
                   cellBackground({
-                    value: value as number,
+                    value: numericValue,
                     colorPositiveNegative,
                     theme,
                   })
                 };
               `
             }
+            ${
+              !(valueRange && numericValue !== undefined && valueRangeFlag) &&
+              backgroundColorCellBar &&
+              `
+                width: 100%;
+                left: 0;
+                background-color: ${backgroundColorCellBar};
+              `

Review Comment:
   Yes. A cell bar encodes a numeric magnitude, so a matching rule should not 
turn a `null`, boolean, or nonnumeric string into a full-width bar. Keep the 
full-width fallback only for numeric cells when no range is available, and make 
`cellDrawsBar` reflect that eligibility so a cell with no bar remains clickable 
for cross-filtering. This avoids presenting missing or nonnumeric values as 
though they had the maximum magnitude.



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