Line break or word wrap for labels in axis
See original GitHub issueHi, I have a short question. Why does not working the line break or word wrap for labels in axis like: vega-lite-line-break-or-word-wrap-for-labels-in-axis?
chart = alt.Chart(data).mark_bar().transform_calculate(
address="split(datum.address, ' ')"
).encode(...)
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Vega-lite: Line break or word wrap for labels in axis
So is there any way to achieve it. I tried using calculate and labelExpr by breaking the label string and then concatenating them...
Read more >Line breaks, word wrap and multiline text in chart labels.
Read the guide on how to enable line breaks and word wrapping in axes labels so that it will fit into the available...
Read more >How to wrap X axis labels in a chart in Excel? - ExtendOffice
And you can do as follows: 1. Double click a label cell, and put the cursor at the place where you will break...
Read more >Text wrapping for x-axis chart labels - Microsoft Community
I have a graph in Word where the labels are getting cut off: I'd like to be able to wrap the text, but...
Read more >How to Wrap Chart Axis Text in Excel - YouTube
... chart axis labels ? It doesn't exist…but this secret hack makes it happen so learn this neat little trick to wrap text...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the explanation. And sorry for the missing example. Is there a plan for a new Altair release?
@qunderriner Your example is working as expected for me. Make sure you are on the latest version of Altair (4.2.0).
@tzipperle Your facet example is also working in 4.2.0, so I am going to close this issue.
For anyone else finding this and looking for ways to wrap labels at word boundaries of specific lengths rather than manually creating a list, you can use the
textwrap
package as described here https://stackoverflow.com/questions/71215156/how-to-wrap-axis-label-in-altairand