version 1
CT SET LEGEND ATTRIBUTES (area; object; display; orientation; reverseOrder; reverseKey; location; horizOffset; vertOffset)
Parameter | Type | Description | |
area | Longint | 4D Chart area | |
object | Longint | Object ID | |
display | Integer | Display legend? | |
0 = No | |||
1 = Yes | |||
orientation | Integer | Orientation of the series in the legend | |
0 = Horizontal | |||
1 = Vertical | |||
reverseOrder | Integer | Reverse order? | |
-1 = No change | |||
0 = Do not reverse | |||
1 = Reverse | |||
reverseKey | Integer | Using reverse order? | |
-1 = No change | |||
0 = Do not reverse | |||
1 = Reverse | |||
location | Integer | Location code | |
horizOffset | Integer | If location = 0: Horizontal offset from | |
plot's left side in points | |||
vertOffset | Integer | If location = 0: Vertical offset from | |
plot's top side in points |
Description
The CT SET LEGEND ATTRIBUTES command sets the attributes of the legend specified by area and object.
display specifies whether or not the legend is displayed.
orientation specifies whether the series in the legend are displayed vertically or horizontally with regard to each other. Here are examples of vertical and horizontal legends:
Vertical Legend Horizontal Legend
reverseOrder specifies whether the order of the series in the legend is reversed.
reverseKey specifies whether the series label and the key that explains the unique pattern and color of the series are reversed. The default is to show the key to the left of the label.
The following table contains the codes for the location parameter:
Code | Location |
-1 | No change |
0 | Position legend using horizOffset and vertOffset |
1 | Top left |
2 | Bottom left |
3 | Top right |
4 | Bottom right |
5 | Left |
6 | Right |
7 | Top |
8 | Bottom |
horizOffset and vertOffset are used when location is set to 0. horizOffset is expressed in points from the left side of the graph to the left side of the legend. vertOffset is expressed in points from the top of the graph to the top of the legend.
Note: To get the text attributes of legend text, use the CT GET CHART TEXT ATTRIBUTES command.
Example
This example displays the legend, centered at the top of the graph.
CT SET LEGEND ATTRIBUTES (Area;$ChartID;1;0;0;0;7;0;0)
See Also
CT GET LEGEND ATTRIBUTES, CT Get legend text, CT SET CHART TEXT ATTRIBUTES, CT SET LEGEND TEXT.