我是 Vega-lite 的新手,我试图弄清楚轴标题中是否可能出现换行符。我有一个长轴标题,例如:
“长轴标题太长,无法放在图表下”
我试过了:
“长轴标题太长,无法放在图表下”和
“长轴标题太长,无法
放在图表下”
"\n" 似乎没有做任何事情。"\[enter]" 只是为该行添加了额外的空间。
我的 x 和 y 编码如下所示:
encoding: {
x: {field: 'a',
type: 'ordinal',
sort: {"encoding": "x"},
axis: {"title": "Knowledge of the elder\
categories would melt\
your psyche",
"titleFontSize": 30,
}
},
y: {field: 'b',
type: 'quantitative',
axis: {"title": "Your puny mortal mind\ncannot comprehend the units\nof the multiverse!",
"titleFontSize": 14,
}
}
}
Run Code Online (Sandbox Code Playgroud)
我没有收到错误消息,但我也没有收到换行符。我要么没有变化(来自 \n),要么是奇怪的间距(来自 [enter])。
谢谢!
vega-lite ×1