Repository navigation
fix(echarts): revert the grain-based bar width cap from #44628 - #45955
Merged
villebro merged 4 commits intoNov 18, 2026
Merged
Conversation
The cap sized each bar to one time-grain bucket measured across the full date span of the data. That assumes each row is one grain bucket and that the chart always shows the full span, so bars collapsed to hairlines when rows are spaced further apart than the grain (e.g. yearly rows at the default Day grain, apache#45474), and zooming in never widened them because the cap is a fixed pixel value computed for the full range. Revert the bar-width half of apache#44628 (getGrainBarMaxWidth, its call sites in Timeseries and MixedTimeseries, the sub-hour TIMEGRAIN_TO_TIMESTAMP entries and ONE_DAY_MS), restoring the barMaxWidth of 100 that 6.1 used. Sparse sub-daily data is better served by Advanced Analytics -> Null Imputation. The coltypes/is_dttm x-axis fallback from apache#44628 is kept, along with its tests.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45955 +/- ##
=======================================
Coverage 85.34% 85.35%
=======================================
Files 3097 3097
Lines 212909 212881 -28
Branches 50193 50179 -14
=======================================
- Hits 181716 181698 -18
+ Misses 27768 27759 -9
+ Partials 3425 3424 -1
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:
|
villebro
marked this pull request as ready for review
November 18, 2026 01:15
Contributor
The sub-hour TIMEGRAIN_TO_TIMESTAMP entries also drive the time axis minInterval/maxInterval, independent of the bar width cap, so keep them and cover the minute grain in a transformProps test.
Reword comments that referred to the removed bar width tests and cap, and flatten the x-axis temporal fallback tests to top-level test().
madhushreeag
approved these changes
Nov 18, 2026
madhushreeag
left a comment
Contributor
There was a problem hiding this comment.
Well-reasoned, cleanly scoped revert ![]()
villebro
added a commit
that referenced
this pull request
Nov 18, 2026
hainenber
pushed a commit
that referenced
this pull request
Nov 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Reverts the bar-width half of #44628, as agreed on #45474.
#44628 capped each bar's width at one time-grain bucket, measured across the full date span of the data (
getGrainBarMaxWidth). That assumes each row is one grain bucket and that the chart always shows the full date span, and both assumptions break in common cases:This removes
getGrainBarMaxWidth, its call sites inTimeseries/transformProps.tsandMixedTimeseries/transformProps.ts, and theONE_DAY_MSconstant #44628 added for it, restoring thebarMaxWidth: 100ceiling that 6.1 shipped. The sub-hourTIMEGRAIN_TO_TIMESTAMPentries #44628 added (second, minute, and 5/10/15/30 minute) are kept: besides the cap, they drive the time axis'sminInterval(andmaxIntervalwith "Force Time Grain as Max Interval") for sub-hour grains, so a minute-grain chart keepsminInterval: 60000. AtransformPropstest covers this for the minute grain. Sparse sub-daily data, the case #44628 targeted, is better served by Advanced Analytics -> Null Imputation, which gives the chart the empty buckets it needs.The other half of #44628, the
coltypes/is_dttmfallback that keeps a temporal x-axis from being mislabeled with raw epoch values, is kept along with its tests. Those tests move fromsparseSubDailyBarGeometry.test.tstoxAxisTemporalFallback.test.tsto match what they cover; the bar-width tests and thegetGrainBarMaxWidthunit tests are removed with the code.This supersedes #45519, which limited the cap to sub-daily grains but left the zoom problem and the sub-daily spacing mismatch in place.
BEFORE
AFTER
TESTING INSTRUCTIONS
npm run test -- plugins/plugin-chart-echarts: 1769 tests pass.ADDITIONAL INFORMATION