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

   ### SUMMARY
   
   The Big Number with Trendline chart clips/truncates the line stroke at the 
edges of the viewport (especially at X=0). This happens because when axes are 
hidden, the ECharts grid is set to zero padding on all sides. Since the line 
stroke extends beyond the data point by half its width, pixels at the boundary 
get cut off.
   
   This fix:
   - Explicitly sets `lineStyle.width` on the trendline series (was previously 
relying on ECharts default)
   - Adds `strokeWidth / 2` padding to the grid on all sides when axes are 
hidden, so the full stroke is visible
   
   The padding is derived from the line width rather than hardcoded, so it 
scales correctly if the stroke width changes.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   **Before:** Trendline stroke is truncated at the left edge (X=0) by ~1px
   **After:** Full stroke is visible with minimal padding that accommodates the 
stroke width
   
   ### TESTING INSTRUCTIONS
   
   1. Create a Big Number with Trendline chart
   2. Ensure "Show X Axis" and "Show Y Axis" are both unchecked (default)
   3. Observe that the trendline stroke is no longer clipped at the 
left/right/top/bottom edges
   4. Enable either axis and verify the chart still uses the standard 
`TIMESERIES_CONSTANTS` grid offsets
   
   ### ADDITIONAL INFORMATION
   - [x] Has associated issue: Fixes #33454
   - [ ] 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]

Reply via email to