Skip to content

Add position to syntax#173

Merged
thomasp85 merged 8 commits intoposit-dev:mainfrom
thomasp85:issue100-position
Mar 10, 2026
Merged

Add position to syntax#173
thomasp85 merged 8 commits intoposit-dev:mainfrom
thomasp85:issue100-position

Conversation

@thomasp85
Copy link
Collaborator

Fix #100

This PR provides position adjustment functionality to ggsql, taking full responsibility for it and turns off any stacking and dodging done be vegalite.

It provides 3 position algorithms: stack, dodge, and jitter, all of which can be tailored in different ways (fill is a special case of stack, jitter dodge is part of jitter, Sina plot are also a jitter special case)

@thomasp85 thomasp85 requested a review from teunbrand March 6, 2026 11:14
Copy link
Collaborator

@teunbrand teunbrand left a comment

Choose a reason for hiding this comment

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

There is some great stuff in this PR.
Most of the comments below are very minor, but the less minor of these are the following:

  • The error that shows up on the CI should be fixed.
  • I think the page about the draw clause should include a short paragraph on position adjustments and link out to the specific pages.
  • I'd like to suggest that duplicated logic be distilled in various places.
  • I don't really understand why position parameters should get special treatment in some cases. Especially in the builder if we just purely use that to represent direct user input without doing validation yet. Maybe we should introduce the equivalent of setup_params() or something for layers.

@thomasp85 thomasp85 requested a review from teunbrand March 10, 2026 08:17
Copy link
Collaborator

@teunbrand teunbrand left a comment

Choose a reason for hiding this comment

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

Once tests pass this LGTM

@thomasp85 thomasp85 merged commit 7f23445 into posit-dev:main Mar 10, 2026
17 checks passed
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.

Add position to syntax

2 participants