axis labelAlign
manually set to left overlaps chart by default (without layerPadding
)
#3808
Labels
bug
For bugs or other software errors
Hi guys!
Currently planning to simulate indented tree-type axes labels by using emojis and some logic in my data processing :)
separate issue Re indented trees: #3382
For this workaround I need to left-align my y axis labels and transform the field to include correct spacers/emojis.
Here is a 'working' (slightly over-complicated layered) example from vega-lite:
https://vega.github.io/editor/#/gist/838b2b13abe1d3bb96f14afcc34869d4/spec.json
Here is the relevant y-encoding axis spec:
It works fine, but I found that I must specify labelPadding here, or else the labels overlap with the chart:
Here is a slightly simplified spec compiled to vega:
https://vega.github.io/editor/#/gist/94b8b93e347448381e07861e300e9a29/spec.json
among the final lines under axes it has:
By changing to
right
, the chart is OK and padding doesn't need to be specified.However, my desired indenting effect depends on left-align. I can specify padding (as above), but for generating these charts it's a little problematic.
Is it feasible for vega to calculate the padding for left-align as it does for right-align, whenever no padding is specified?
Note: similar issue when I try
"labelAlign": "center"
Related: #1751
Thanks,
Declan
The text was updated successfully, but these errors were encountered: