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
Arc mark rotation affects container layout #2780
Comments
Is this a Vega-Lite or Vega issue? |
Sorry, it's vega. The same behavior can be reproduced with the {
"$schema": "https://vega.github.io/schema/vega-lite/v4.14.0.json",
"title": "Rotated Pie Chart",
"mark": {"angle": 45, "type": "arc"},
"data": {"name": "data"},
"encoding": {
"color": {"field": "category", "type": "nominal"},
"theta": {"field": "value", "type": "quantitative"}
},
"datasets": {
"data": [
{"category": 1, "value": 4},
{"category": 2, "value": 6},
{"category": 3, "value": 10},
{"category": 4, "value": 3},
{"category": 5, "value": 7},
{"category": 6, "value": 8}
]
}
} @domoritz Can you re-host this issue in the vega project? |
Thanks @marcprux! This reveals a bug in the arc bounds calculation. Here's the same example with the bounds also rendered, illustrating the problem: |
The crux of the issue is that the |
Take the following pie chart with an arc mark:
Change the mark's "angle" property from 0 to 45, and it is rendered as:
The padding and position relative to the title and legend all changed, even through all we wanted to do was change the default rotation of the pie chart.
The text was updated successfully, but these errors were encountered: