I'm trying to label a bar chart with rotated labels
see this simple example:
BarChart[RandomReal[1, 10], BarSpacing -> Large,
ChartLabels ->
Placed[ToString /@ RandomReal[100000, 10], Axis, Rotate[#, Pi/4] &]]
In this case the center of the label is aligned with the center of the bar.

I want the right/top of the label to be aligned with the center of the bar instead, basically shift the labels over a bit to the left. How can this be done?
Also, what if all the labels have different lengths:

Answer
Something like this could also do:
BarChart[RandomReal[1, 10], BarSpacing -> Large,
ChartLabels ->
Placed[ToString /@
RandomChoice[ExampleData[{"Text", "DeclarationOfIndependence"}, "Words"], 10],
Axis, Rotate[#, Pi/4] &]] /.
ImageScaled[{1/2, 1}] -> ImageScaled[{0.9, 1}]

Comments
Post a Comment