1
$\begingroup$
data = <|"Location NH" -> 1, "Location MO" -> 1, "Location WA" -> 2, 
  "Location OH" -> 3, "Location CO" -> 4, "Location CA" -> 6, 
  "Location TX" -> 7, "Location IL" -> 150|>

BarChart[data, LabelingFunction -> Right, BarOrigin -> Left, 
 ChartLabels -> Automatic, ImageSize -> 600]

The label overlaps with the axis and chart label

enter image description here

Is there a way to get the label to appear to the left of the bar rather than inside the left side of the bar? Similar to Above, which displays the label above the top of the bar?

BarChart[data, LabelingFunction -> Above, ChartLabels -> Automatic, 
 ImageSize -> 600]

enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

For putting the labels the right of the bar you can use LabelingFunction -> After:

BarChart[data, LabelingFunction -> After, BarOrigin -> Left, 
 ChartLabels -> Automatic, ImageSize -> 600]

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks!. All of the possible values Left, Right, Above, Below, Center, After, Before, etc. don't seem to be documented in a single page. $\endgroup$ Jul 20, 2019 at 3:41
  • $\begingroup$ @Rohit, my pleasure. Thank you for the accept. You are right about documentation. The possible values for the second argument of Placed varies depending on where it is used. $\endgroup$
    – kglr
    Jul 20, 2019 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.