fix(plugin-chart-echarts): prevent trendline stroke clipping at chart edges#37918
Conversation
Code Review Agent Run #3d4613Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
f14114b to
0a64ec2
Compare
Code Review Agent Run #6ac3b5Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
… edges The BigNumber with Trendline chart was clipping the line stroke at the edges (especially X=0) because the ECharts grid had zero padding when axes were hidden. The stroke extends beyond the data point by half its width, so pixels at the boundary were truncated by the viewport. Add half-strokeWidth padding to the grid on all sides when axes are hidden, and explicitly set lineStyle.width so the padding stays in sync with the actual stroke size. Fixes #33454 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0a64ec2 to
12e1917
Compare
Code Review Agent Run #a030e8Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
🎪 Showtime deployed environment on GHA for 12e1917 • Environment: http://16.148.73.141:8080 (admin/admin) |
|
From manual testing, I see that a scroll bar has appeared. after.mov |
Code Review Agent Run #1ae351Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
🎪 Showtime deployed environment on GHA for 44a0738 • Environment: http://35.89.211.85:8080 (admin/admin) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #37918 +/- ##
========================================
Coverage 64.45% 64.45%
========================================
Files 2670 2670
Lines 147343 147201 -142
Branches 33988 33953 -35
========================================
- Hits 94966 94882 -84
+ Misses 50650 50610 -40
+ Partials 1727 1709 -18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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:
lineStyle.widthon the trendline series (was previously relying on ECharts default)strokeWidth / 2padding to the grid on all sides when axes are hidden, so the full stroke is visibleThe 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
TIMESERIES_CONSTANTSgrid offsetsADDITIONAL INFORMATION