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

Incorrect stack/orientation for 1D charts #9167

Closed
kanitw opened this issue Nov 8, 2023 · 0 comments · Fixed by #9168
Closed

Incorrect stack/orientation for 1D charts #9167

kanitw opened this issue Nov 8, 2023 · 0 comments · Fixed by #9168
Labels

Comments

@kanitw
Copy link
Member

kanitw commented Nov 8, 2023

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "A simple bar chart with embedded data.",
  "data": {
    "values": [
      {"b": 0},
      {"b": 10},
      {"b": 10},
      {"b": 10},
      {"b": 10},
      {"b": 20}
    ]
  },
  "mark": {"type": "bar", "orient": "horizontal"},
  "encoding": {
    "y": {"field": "b", "type": "quantitative"}
  }
}

The max value in the data is 20

image

But the domain is the sum of values, due to incorrect stacking logic.

@kanitw kanitw added the Bug 🐛 label Nov 8, 2023
kanitw added a commit that referenced this issue Nov 8, 2023
* docs(example): bar_1d_dimension only

* chore: update examples [CI]

* fix: make 1D bar respect orientation for stack calculation (#9167)

* chore: update examples [CI]

---------

Co-authored-by: GitHub Actions Bot <vega-actions-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant