ChartDirector 7.1 (.NET Edition)

BaseChart.addText


Usage

[C#]public ChartDirector.TextBox addText(int x, int y, string text [, string font [, double fontSize [, int fontColor [, int alignment [, double angle ]]]]]);
[VB]Public Function addText(x As Integer, y As Integer, text As String [, font As String [, fontSize As Double [, fontColor As Integer [, alignment As Integer [, angle As Double ]]]]]) As ChartDirector.TextBox

Description

Adds a text box to the chart.

By default, only the text is visible, the box is transparent. This method returns a TextBox object that can be used to change the appearance of the text box.

Arguments

ArgumentDefaultDescription
x(Mandatory)The x pixel coordinate of the left of the text box.
y(Mandatory)The y pixel coordinate of the top of the text box.
text(Mandatory)The text to shown in the text box. CDML
font""The font used to draw the text. See Font Specification for details on various font attributes.
fontSize8The font size used to draw the text.
fontColorTextColorThe color used to draw the text.
alignmentTopLeftThe alignment of the text within the text box. See Alignment Specification for supported alignment types.
angle0The rotation angle of the text within the text box.

Return Value

A TextBox object representing the text box. This may be used to fine-tune the appearance of the text box.