-
-
Notifications
You must be signed in to change notification settings - Fork 668
fix: Arc mark does not stack for quantitative definitions when different fields are used for theta and radius [draft]
#9512
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
base: main
Are you sure you want to change the base?
Conversation
theta and radius
theta and radiustheta and radius [draft]
0b7380a to
7f6ed6d
Compare
Deploying vega-lite with
|
| Latest commit: |
dd36450
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://93a330b1.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
|
|
||
| if (!hasSameDimensionAndStackedField && (isPolar ? dimensionChannel === fieldChannel || encoding['color'] : true)) { | ||
| // 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
| 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)binaggregatortimeUnit
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
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 in the cartesian case, the Whereas in the polar case, the stack transform gets created, but has a groupBy of |
…el and stackChannel are same
…hannels are matching
158366e to
dd36450
Compare
d8b3ab4 to
c5eae62
Compare
|
I’ve been thinking more about why the polarCoordinates check was needed in this PR (and revisiting the grammar of graphics book) as I have tried a few variations on trying to get the intended behavior without checking for polar coordinates, and I noticed something that makes me feel more OK about having a special condition for polar.
If we want stacking to be supported by
|
|
@kanitw @hydrosquall what's left here to merge this? |
|
I’m hoping to get @kanitw’s review on whether this change is usable.
We both wish a different solution that wasn’t polar aware might be
possible, but I haven’t found a way to do it yet.
…On Thu, Jul 3, 2025 at 7:50 AM Dominik Moritz ***@***.***> wrote:
*domoritz* left a comment (vega/vega-lite#9512)
<#9512 (comment)>
@kanitw <https://github.com/kanitw> @hydrosquall
<https://github.com/hydrosquall> what's left here to merge this?
—
Reply to this email directly, view it on GitHub
<#9512 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACE2MM6BR2QAP6X2AD2XOST3GUKG7AVCNFSM6AAAAABVQWNFUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMZRHE3TOMBQGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|



Motivation
arcmark with stacks, change graph renderingChanges
groupByfield when thedimensionfield is using aquantitativescale. This ensures that stacking is applied correctly.radiusrather thanthetaTesting
stacks should apply forarcmarks?