1.167 FAQ-829 How to specify the alignment for symbol and text in legend?

Last Update: 7/31/2018


The alignment of symbol and text in legend is left, by default. You can change right-alignment or other by editing the legend substitution notation:

  1. Activate the graph, and select Window: Script Window.
  2. Run the script below in Script Window in order to turn on the alignment mode.
    legend.align=1;   //turn on the alignment mode
  3. Select the legend, and then right-click to select Properties... to open the dialog Object Properties.
  4. Add \^(*) as a cell anchor before the text you want to modify. This sets alignment for the object on the right side of anchor, for example:
    How to change the alignment of text inside a legend into right 1.png
    Note: \^(l), \^(c), \^(r) are left, center and right alignment respectively.
  5. After clicking the OK button, the legend will be shown the same as the preview in the dialog.
    How to change the alignment of text inside a legend into right 3.png

Alternately, you can:

  1. Select the legend in order to show up the legend border.
  2. Press CTRL and drag to re-arrange the legend.
How to change the alignment of text inside a legend into right 2.png


Please read the details in Legend Element Alignment.


Keywords:Legend, Alignment