ChartDirector 7.1 (C++ Edition)

Layer.setDataLabelStyle


Usage

TextBox *setDataLabelStyle(const char *font = 0, double fontSize = 8, int fontColor = TextColor, double fontAngle = 0);

Description

Enables data labels and sets their styles.

This method affects all data labels in the layer. To set the style for one particular data set only, use DataSet.setDataLabelStyle.

Data labels are text used label data points in the layer. Different layer types put data labels in different positions. For example, in a bar chart, data labels are put at the internal end of the bar. For a line chart, data labels are put above the data points.

For some chart types, the position of the data labels can be manipulated by calling the TextBox.setAlignment method of the TextBox object returned by the setDataLabelStyle method.

See Font Specification for details on various font attributes.

Arguments

ArgumentDefaultDescription
font""The font used to draw the labels.
fontSize8The font size used to draw the labels.
fontColorTextColorThe color used to draw the labels.
fontAngle0The rotation angle of the labels.

Return Value

A TextBox object representing the prototype of the data labels. This may be used to fine-tune the appearance of the data labels.