4D Chart v13

CT SET LABEL ATTRIBUTES

Home

 
4D Chart v13
CT SET LABEL ATTRIBUTES

CT SET LABEL ATTRIBUTES 


 

CT SET LABEL ATTRIBUTES ( area ; object ; axis ; position ; orientation ; format ; frequency ) 
Parameter Type   Description
area  Longint in 4D Chart area
object  Longint in Object ID
axis  Integer in Chart axis 0 = Category 1 = Series 2 = Values
position  Integer in Position of label -1 = No change 0 = None 1 = Top 2 = Left 3 = Bottom 4 = Right
orientation  Integer in Label orientation -1 = No change 0 = Normal 1 = Vertical 2 = Rotated right 3 = Rotated left 4 = Staggered 5 = Wrap around
format  String in Label format
frequency  Integer in Label display frequency (1-255)

The CT SET LABEL ATTRIBUTES command changes the attributes of position, orientation, and format for the label of the axis specified by area, object, and axis.

position is the position of the axis labels relative to the graph.

orientation is the orientation of each label. For a table showing each orientation option, see the description of CT GET LABEL ATTRIBUTES.

format is the display format for the label text. To specify the “General” format, pass an empty string "" in the format parameter. For more information about the special characters used in display formats, see the 4D Design Reference manual.

The optional parameter frequency allows you to set the label display frequency for category or series axes. This parameter is useful if you have a large number of distinct values on a category or series axis and there is not enough room on the graph to print all the labels. By setting frequency to a value greater than 1, you can choose to suppress the printing of a specified percentage of the category or series labels. For example, setting frequency to 3 prints every third label.

frequency must be in the range of 1 to 255. If it is zero, the default value of 1 (print all labels) is used. frequency is ignored if the specified axis is the Values axis. Also, frequency is not used for polar or pie charts. The last label is always printed.

If frequency is set to -1, 4D Chart will automatically set the label display frequency depending on the graph dimensions.

Note: To set the text attributes of axis labels, use the CT SET CHART TEXT ATTRIBUTES command.

Example  

This example changes the Category axis label attributes for the chart specified by $ChartID. The code sets the label position to Bottom, the format to General, and the orientation to Rotated Right.

 CT SET LABEL ATTRIBUTES(Area;$ChartID;0;3;2;"")

 
PROPERTIES 

Product: 4D Chart
Theme: CT Chart
Number: 14530

 
INDEX

Alphabetical list of commands

 
HISTORY 

Modified: 4D Chart 6

 
SEE ALSO 

CT GET LABEL ATTRIBUTES
CT SET CHART TEXT ATTRIBUTES