janani-gurram opened a new pull request, #35693: URL: https://github.com/apache/superset/pull/35693
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY 1. Fixes the histogram chart so that the chart renders even when the x-axis variable contains NULL values. 2. Adds unit tests to verify the behavior when: - The target column has all nulls (with and without grouping) - The target column has some nulls (with and without grouping) This issue is fixed by removing empty values from the input DataFrame before rendering. In cases where dropping these values results in an empty DataFrame, we now safely return the empty DataFrame instead of failing. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> **Before** The chart failed to render when the selected column contained NULLs. <img width="1168" height="549" alt="Screenshot 2025-10-16 at 11 10 41 AM" src="https://github.com/user-attachments/assets/27ede74e-f08e-426d-8101-be9ec74e4e6c" /> **After** The chart now renders correctly, ignoring NULL values. <img width="1165" height="591" alt="Screenshot 2025-10-16 at 11 11 52 AM" src="https://github.com/user-attachments/assets/9f3ad89b-0238-4fb5-8b80-21092c4b698f" /> ### TESTING INSTRUCTIONS 1. Open any dataset and create a histogram chart. 2. Select a column that contains NULL values. 3. Verify that the chart renders correctly, excluding NULL entries. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [x] Has associated issue: Fixes #33738 - [ ] Required feature flags: - [x] 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]
