-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
Axes label wrap produce incorrect bar plots when combined with offset #9568
Comments
Any news on this? |
Reproducible in Vega-Lite. {
"$schema": "https://vega.github.io/schema/vega-lite/v5.21.0.json",
"data": {
"values": [
{"x": "lorem ipsum", "y": 1, "offset": "foo"},
{"x": "dolor sit", "y": 2, "offset": "foo"},
{"x": "lorem ipsum", "y": 3, "offset": "bah"},
{"x": "dolor sit", "y": 4, "offset": "bah"}
]
},
"mark": {"type": "bar"},
"encoding": {
"color": {"field": "offset", "type": "nominal"},
"x": {"axis": {"labelAngle": 0}, "field": "x", "type": "nominal"},
"xOffset": {"field": "offset", "type": "nominal"},
"y": {"field": "y", "type": "quantitative"}
}
} Open the Chart in the Vega Editor ![]() This doesn't: {
"$schema": "https://vega.github.io/schema/vega-lite/v5.21.0.json",
"data": {
"values": [
{"x": [["lorem "], ["ipsum "]], "y": 1, "offset": "foo"},
{"x": [["dolor "], ["sit "]], "y": 2, "offset": "foo"},
{"x": [["lorem "], ["ipsum "]], "y": 3, "offset": "bah"},
{"x": [["dolor "], ["sit "]], "y": 4, "offset": "bah"}
]
},
"mark": {"type": "bar"},
"encoding": {
"color": {"field": "offset", "type": "nominal"},
"x": {"axis": {"labelAngle": 0}, "field": "x", "type": "nominal"},
"xOffset": {"field": "offset", "type": "nominal"},
"y": {"field": "y", "type": "quantitative"}
}
} Open the Chart in the Vega Editor ![]() |
Still repros but shouldn't it be Open the Chart in the Vega Editor? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
When we wrap the text and try to use it with layer, fill, and facet, the plot created is all incorrect.
This works as intended for the bar and text in the plot, but the labels are not readable:
If we wrap the labels, the bars and text are incorrectly placed in the plot:
What would you like to happen instead?
No response
Which version of Altair are you using?
No response
The text was updated successfully, but these errors were encountered: