1.290 FAQ-1168 How to Align Symbols in Legend?Align-symbol-in-legend
Last Update: 3/29/2023
The Legend object usually contains two columns— the left column with legend symbol (usually same width) and the right column with legend text. By default, the legend symbol widths are the same and aligned, and so, using the Alignment toolbar button or Mini Toolbar only affects the alignment on the legend text column only.
But, if after setting the legend to be center or right-aligned and you notice the legend symbol column isn't aligned, e.g.
-
then, your legend object is not a "real" legend object.
Please try the following steps:
- Alt+Double-click on the legend object and check the object Name on Programming tab in Text Object dialog. Make sure the name is Legend and click Apply button. This ensures your object has special Legend properties and is not just a normal Text object.
-
- Then go to the Text tab and make sure the Align Columns checkbox is checked.
-
- If you want to keep the whole legend center aligned but the legend text right aligned, add cell anchor \^(r) before each legend text.
-
\^() is used as cell anchor, which sets the alignment for the object following on its right. \^(l), \^(c), \^(r) are LEFT, CENTER, and RIGHT alignment, respectively.
In certain situations, a graph needs two legend objects and so a text object is created as a second legend. This second text object should not be renamed to 'Legend' since we don't support duplicate object names in a graph. Since this text object cannot be renamed 'Legend' and inherit its special properties, we must use the cell anchor notation.
If this is the case, please try the following:
- Check Align Columns checkbox on Text tab of the Text Object dialog.
- For each row of legend symbol and legend text, add \^(l) before each legend symbol part to align legend symbols column.
-
- Again add \^(r) before each legend text part to right align legend text part.
-
See Also:
FAQ-829 How can I right-align legend text or arrange the graph legend horizontally?
Keywords:Legend, Alignment, left-aligned, legend symbol
|