-
-
Notifications
You must be signed in to change notification settings - Fork 633
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: Arc mark does not stack for quantitative
definitions when different fields are used for theta
and radius
[draft]
#9512
base: main
Are you sure you want to change the base?
Conversation
theta
and radius
theta
and radius
theta
and radius
[draft]
0b7380a
to
7f6ed6d
Compare
Deploying vega-lite with
|
Latest commit: |
2ebd1b1
|
Status: | ✅ Deploy successful! |
Preview URL: | https://f81c430e.vega-lite.pages.dev |
Branch Preview URL: | https://cameron-yick-fix-compile-pie.vega-lite.pages.dev |
7f6ed6d
to
3b1d979
Compare
theta
and radius
[draft]theta
and radius
[draft]
src/stack.ts
Outdated
// avoid grouping by the stacked field | ||
// TKTK: find out why |
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.
If this works here, we may need a similar change for the code block under dimensionOffsetChannel
.
src/stack.ts
Outdated
@@ -182,7 +182,7 @@ export function stack(m: Mark | MarkDef, encoding: Encoding<string>): StackPrope | |||
// TBD: we should only enter this branch if there's also a "color" and maybe a group channel? | |||
const isPolar = isPolarPositionChannel(fieldChannel) || isPolarPositionChannel(dimensionChannel); | |||
|
|||
if (!hasSameDimensionAndStackedField && (isPolar ? dimensionChannel === fieldChannel || encoding['color'] : true)) { | |||
if (!hasSameDimensionAndStackedField && (isPolar ? dimensionChannel === fieldChannel : true)) { |
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.
89b647c
to
369fa1e
Compare
theta
and radius
[draft]quantitative
definitions when different fields are used for theta
and radius
[draft]
quantitative
definitions when different fields are used for theta
and radius
[draft]quantitative
definitions when different fields are used for theta
and radius
[draft]
a21fed9
to
905e53c
Compare
905e53c
to
6d37199
Compare
const isPolar = isPolarPositionChannel(fieldChannel) || isPolarPositionChannel(dimensionChannel); | ||
const shouldAddPolarGroupBy = !isUnbinnedQuantitative(dimensionDef); | ||
|
||
if (isPolar ? shouldAddPolarGroupBy : !hasSameDimensionAndStackedField) { |
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.
I wonder if we really need isPolar ? shouldAddPolarGroupBy :
clause? If we strictly check the field above, would that be sufficient?
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.
By strictly check, do you mean we'd check if dimensionDef
and stackedFieldDef
have the same
field
(the current check)bin
aggregator
timeUnit
for both polar and cartesian graphs?
Currently if I just remove the isPolar ? shouldAddPolarGroupBy
clause and use the existing check, we'd introduce this bug
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 PoC commit to see if this is what you had in mind
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.
we'd introduce this bug
can't find this link
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.
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.
I found it interesting to see how many of the visual tests break if I removed the check that only applies this change to polar encodings.
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.
Thanks for the PR. I think the test and regression case look good, but I wonder if the condition added can be more precise/simpler.
6d37199
to
ca62a23
Compare
…el and stackChannel are same
…hannels are matching
ca62a23
to
2ebd1b1
Compare
Shrinking the example down to see if how the issue looks in both coordinate systems on current prod editor (not this branch)
Note that in the cartesian case, the |
Motivation
arc
mark with stacks, change graph renderingChanges
groupBy
field when thedimension
field is using aquantitative
scale. This ensures that stacking is applied correctly.radius
rather thantheta
Testing
stack
s should apply forarc
marks?