# How to put legends in a chart plot [closed]

How can I put a chart legend inside a bar chart? I tried Placed[ ... ,{Right,Top}], but it didn't work. It works for Plot. However, it doesn't work for BarChart.

-

## closed as off-topic by Jacob Akkerboom, ciao, bobthechemist, Michael E2, ubpdqnMar 30 '14 at 9:42

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Jacob Akkerboom, ciao, bobthechemist, Michael E2, ubpdqn
If this question can be reworded to fit the rules in the help center, please edit the question.

## 1 Answer

Here are some examples:

Column[
BarChart[{{1, 2, 3}, {4, 5, 6}},
ChartLegends ->
Placed[{{"Group A", "Group B"}, None}, {#}], ChartStyle -> {"Pastel", None}] & /@
{Left, Right, Top, Bottom, {0.2, 0.7}},
Frame -> All]


-
Looking good :) –  Jacob Akkerboom Mar 26 '14 at 12:45
When I want to export the figure, the legends are not included. –  yashar Mar 26 '14 at 12:49
@yashar The above graphic was created by exporting the code in the post...I am uncertain what the issue is. However, there are a number of posts on MSE on the exporting of graphics with legends that may be helpful. –  ubpdqn Mar 26 '14 at 12:56