LuisSanchez opened a new pull request, #36819:
URL: https://github.com/apache/superset/pull/36819

   ### SUMMARY
   **Bug**: Table chart cell bars didn't render for columns containing NULL 
values, even when other rows had valid numeric data.
   
   **Root Cause**: The `getValueRange` function required all values in a column 
to be numeric (`nums.length === data.length`). If any cell was NULL, the column 
returned `null` and no bars were rendered.
   
   **Solution**:
   1. Changed the condition to require at least one numeric value (`nums.length 
> 0`) instead of all values being numeric.
   2. Added a type check (`typeof value === 'number'`) before rendering cell 
bars to prevent `BigInt` values from causing `Math.abs` errors.
   
   **Result**: Columns with NULL values now render bars for non-NULL numeric 
cells, and `BigInt` values are safely excluded from bar rendering.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   ### Before
   <img width="2816" height="1502" alt="image" 
src="https://github.com/user-attachments/assets/a7468ad9-7521-45b7-b4bf-a8bd7e595581";
 />
   
   ### After
   <img width="1433" height="434" alt="image" 
src="https://github.com/user-attachments/assets/ef3d91b1-da2b-4428-970f-a69bb766d57d";
 />
   
   
   ### TESTING INSTRUCTIONS
   1. Create a table chart with a dataset containing columns with mixed NULL 
and numeric values
   2. Enable "Show cell bars" in the chart configuration
   4. Verify that numeric cells display bars even when other cells in the same 
column are NULL
   5. Verify that BigInt values don't cause rendering errors
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue:
   - [ ] Required feature flags:
   - [ ] 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