Closed DougBurke closed 4 years ago
Thanks for raising this. In order to avoid inflating the API, I have simply allowed maText
to accept multi-line strings (or strings with '\n' within them). This is consistent with multi-line text handling elsewhere (mStr
, title
etc.).
I've updated the Likert example to reflect this.
For anyone wishing to allow input of string lists, it would be a simple case of creating a helper function List.intersperse "\n" >> String.concat
I was going through the Vega-Lite examples for hvega, and came to https://vega.github.io/vega-lite/examples/concat_layer_voyager_result.html which has this construct (the ability for text to take an array of strings looks to have been added somewhere in v4):
My current approach in
hvega
is to add an equivalent tomaText
but for lists - e.g.An alternative was to make
maText
accept a list rather than a scalar (I'm not sure which is better).I know you have a version of this visualization in your gallery code, but it looks like it requires a lot more work to get a similar display than supporting lists for text.
I haven't checked to see if any of the other mark properties can now take lists. I guess I should.