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

Support bandPosition for area marks #9313

Open
1 task done
djbarnwal opened this issue Apr 16, 2024 · 0 comments
Open
1 task done

Support bandPosition for area marks #9313

djbarnwal opened this issue Apr 16, 2024 · 0 comments

Comments

@djbarnwal
Copy link
Member

Enhancement Description

bandPosition is supported for bars and line but not for area marks. It would be great to support area as well. Area charts are interchangeably used with line charts so there's a wide use case here as well

{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Google's stock price over time.",
  "data": {"url": "data/stocks.csv"},
  "width": 900,
  "transform": [
    {"filter": "datum.symbol==='GOOG'"},
    {"filter": {"field": "date", "timeUnit": "year", "range": [2006, 2007]}}
  ],
  "mark": "area",
  "encoding": {
    "x": {"field": "date", "type": "temporal", "timeUnit": "yearmonth", "bandPosition": 0.5},
    "y": {"field": "price", "type": "quantitative"}
  }
}

Replacing area with line in the above spec works out fine.

Checklist

  • I checked for duplicate issues.
@djbarnwal djbarnwal changed the title Support bandPosition for area marks Support bandPosition for area marks Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant