zylatis
zylatis

Reputation: 478

Add X axis title to grouped Vega-Lite barchart

I have the following Vega Lite plot

and I am trying to understand how to put some text across the xaxis to indiciate the units there. If I try to add a title to the x-axis itself it adds underneath each pair of bars, which I don't want.

Upvotes: 2

Views: 90

Answers (1)

CS.
CS.

Reputation: 786

If I understood this right, you want to show some text across X-Axis, the way it would have appeared without grouping the marks.

Using the title of header configuration in column should work.
"header": {"labelOrient": "bottom", "title": "#Items", "titleOrient": "bottom"}

Updated Vega-Lite plot

Upvotes: 1

Related Questions