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

   ### SUMMARY
   
   #### Problem
   - Value labels (e.g., "20k") were cut off on the right
   - X-axis max used rounded values, creating gaps and hiding labels
   
   #### Solution
   - Calculate axis max/min from actual data for horizontal bar charts
   - Set axis bounds to data values (not rounded) to avoid gaps
   - Handle diverging bars with negative values
   - Increase right padding up to 70px (via constant) when value labels are 
shown
   - Respect explicit user-defined yAxisBounds when set
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   ### BEFORE
   <img width="1231" height="589" alt="image" 
src="https://github.com/user-attachments/assets/e4c9a9d7-72de-4bf2-bb84-5ee1189b446b";
 />
   
   ### AFTER
   <img width="1230" height="601" alt="image" 
src="https://github.com/user-attachments/assets/c1ce881c-102b-4dc3-b145-8ca708c21dcc";
 />
   
   
   ### TESTING INSTRUCTIONS
   
   1. Create a Bar chart using a metric with negative values
   2. Select Horizontal view
   3. Enable the Show value feature in the Customize tab.
   
   Use a simple dataset like:
   ``` sql
   SELECT * FROM (
       VALUES
           ('Category A', 20000),
           ('Category B', -21000),
           ('Category C', 18000),
   ) AS t(category, value1)
   ```
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: 
[34401](https://github.com/apache/superset/issues/34401)
   - [ ] 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