Skip to content

Conversation

@kanitw
Copy link
Member

@kanitw kanitw commented Nov 16, 2023

fix #9177

See the fixed example

cc: @richardliu-db

: isRelativeBandSize(bandSize)
? (1 - bandSize.band) / 2
: 0
bandPosition: offsetType === 'encoding' ? 0 : bandPosition
Copy link
Contributor

@richardliu-db richardliu-db Nov 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested different combinations of center and offsetType, and found that this is not consistent with the old version.

The bandPosition used by defaultRef is signal-relative value in the old implementation, but 0 in the new implementation, when center is false and offsetType check is true.

This nested ternary expression is already very complex. Consider making it a function and testing it in unit test.

Copy link
Contributor

@richardliu-db richardliu-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment regarding the behavior inconsistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discrete band size doesn't work with grouped bar

3 participants