Passing a string with '\n' in it doesn't seem to work
I don't believe this is allowed currently in Vega-Lite.
Yep. This is currently not supported in Vega-Lite due to lack of support for this Vega.
But there is a feature request in Vega. https://github.com/vega/vega/issues/488.
Closing as vega-lite-related.
Sorry to comment on a closed issue, but could someone clarify how vega-lite-related issues work? I understand it needs to be implemented in Vega-lite first, but will it "automatically" work if it's implemented there or is there a delay while Altair features catch up ? It seems there isn't much hope of waiting for it to be implemented in Vega-lite...issue 488 seems pretty inactive.
This functionality is pretty essential (in my opinion) and I'm trying to figure out whether a PR to "hack this functionality" in Altair would be supported (assuming I can figure out how to do it).
"vega-lite related" generally means there is no change you could make to the Altair codebase that would address the issue.
ah okay. thanks then
Can we reopen this? Looks like vega-lite will support this but requres passing a string array instead of a string.
For anyone revisiting this, Vega now supports this multiline functionality. Just pass in a list of strings as the title:
axis=alt.Axis(title=['Text on the first line', 'and text on the second line'])
Most helpful comment
For anyone revisiting this, Vega now supports this multiline functionality. Just pass in a list of strings as the title:
axis=alt.Axis(title=['Text on the first line', 'and text on the second line'])