Skip to content
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

feat: make bar & rect marks support bandPosition (allow center-align bars and ticks) #9126

Merged
merged 12 commits into from
Oct 9, 2023

Conversation

kanitw
Copy link
Member

@kanitw kanitw commented Oct 5, 2023

feat: make bar & rect marks support bandPosition (allow center-align bars and ticks)!

(Address concerns discussed in #9025.)

Example: (left = old style, right = center align bar and ticks)

image

This also works for grouped bars

image

@kanitw kanitw marked this pull request as ready for review October 5, 2023 23:16
@kanitw kanitw marked this pull request as draft October 5, 2023 23:16
@kanitw kanitw force-pushed the kw/timeUnit-bar-bandPosition branch from 5e5a4c3 to f22bd4c Compare October 5, 2023 23:37
@kanitw kanitw marked this pull request as ready for review October 5, 2023 23:39
@kanitw kanitw force-pushed the kw/timeUnit-bar-bandPosition branch from 2d794ea to b4827b6 Compare October 5, 2023 23:41
@kanitw kanitw changed the title feat: make bar & rect marks support bandPosition (so we can align bar and ticks) feat: make bar & rect marks support bandPosition (allow center-align bars and ticks) Oct 5, 2023
@kanitw kanitw force-pushed the kw/timeUnit-bar-bandPosition branch from b4827b6 to 123c428 Compare October 5, 2023 23:50
@kanitw kanitw force-pushed the kw/timeUnit-bar-bandPosition branch from 123c428 to 3d5110e Compare October 6, 2023 21:55
Copy link
Contributor

@fandu-db fandu-db left a comment

Choose a reason for hiding this comment

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

LGTM!

@kanitw kanitw merged commit bd014eb into main Oct 9, 2023
11 checks passed
@kanitw kanitw deleted the kw/timeUnit-bar-bandPosition branch October 9, 2023 17:06
BradyJ27 pushed a commit to BradyJ27/vega-lite that referenced this pull request Oct 19, 2023
…ent with ticks) (vega#9126)

* docs(examples): examples for using bandPosition=0

* chore: update examples [CI]

* fix: calculate offseted rect position for timeUnit if bandPosition != 0.5

* fix: use offsetted rect position in aggregate

* fix: use offsetted rect in mark position

* fix: use offsetted rect in scale domain

* fix: correctly read default bandPosition

* fix: apply bandOffset to grouped bars with timeUnit

* chore: update examples [CI]

* style: auto-formatting [CI]

* docs: update docs

* chore: update TOC [CI]

---------

Co-authored-by: GitHub Actions Bot <[email protected]>
alliefeldman pushed a commit to alliefeldman/vega-lite that referenced this pull request Nov 2, 2023
…ent with ticks) (vega#9126)

* docs(examples): examples for using bandPosition=0

* chore: update examples [CI]

* fix: calculate offseted rect position for timeUnit if bandPosition != 0.5

* fix: use offsetted rect position in aggregate

* fix: use offsetted rect in mark position

* fix: use offsetted rect in scale domain

* fix: correctly read default bandPosition

* fix: apply bandOffset to grouped bars with timeUnit

* chore: update examples [CI]

* style: auto-formatting [CI]

* docs: update docs

* chore: update TOC [CI]

---------

Co-authored-by: GitHub Actions Bot <[email protected]>
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.

2 participants