-
Notifications
You must be signed in to change notification settings - Fork 612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: fix thin bar problem (#8350) #8349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made a minor comment due to my lack of the context. Feel free to merge if you are sure about it.
@@ -156,7 +162,8 @@ function positionAndSize( | |||
If band is 0.6, the the x/y position in such case should be `(1 - band) / 2` = 0.2 | |||
*/ | |||
|
|||
const defaultBandAlign = scale?.get('type') !== 'band' || !('band' in sizeMixins[vgSizeChannel]) ? 'middle' : 'top'; | |||
const defaultBandAlign = | |||
scale?.get('type') === 'band' && isRelativeBandSize(bandSize) && !hasFixedSizeMixins ? 'top' : 'middle'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain if
('band' in sizeMixins[vgSizeChannel])
is equivalent isRelativeBandSize(bandSize) && !hasFixedSizeMixins
?
I wonder if this logic change is correct and necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, since we output {signal: max(0.25, bandwidth('x'))}
instead of {"scale": "x", "band": 1}
, the old logic that checks for "band" doesn't work anymore.
I tracked how band
in
sizeMixins[vgSizeChannel]` was generated and found that
band
in sizeMixins[vgSizeChannel]
only happens if the "bandSize" is relative and there is no size from mark/encoding (i'll rename the variable to hasSizeFromMarkOrEncoding
).
🚀 PR was released in |
See the added
bar_group_thin
example before and after the behavior fix commit.(Other Vega diffs do not produce image diffs, so this shouldn't introduce any regression.)
📦 Published PR as canary version:
5.4.1--canary.8349.4227eff.0
✨ Test out this PR locally via:
npm install vega-lite@5.4.1--canary.8349.4227eff.0 # or yarn add vega-lite@5.4.1--canary.8349.4227eff.0
Version
Published prerelease version:
v5.4.1-next.1
Changelog
🐛 Bug Fix
timeFormatType
field #8320 (@lsh vega-actions-bot@users.noreply.github.com)Authors: 5