Skip to main content

TextAnnotation(String, String) Constructor

Initializes a new instance of the TextAnnotation class with the specified name and text.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v23.2.dll

NuGet Package: DevExpress.Charts

Declaration

public TextAnnotation(
    string name,
    string text
)

Parameters

Name Type Description
name String

A String value specifying the annotation’s name. This value is assigned to the ChartElementNamed.Name property.

text String

A String value specifying the annotation’s text. This value is assigned to the TextAnnotation.Text property.

Remarks

Use this constructor to create a text annotation with the specified name and text.

After an annotation is added to an element’s collection, it can be accessed via the corresponding property of this element (ChartControl.Annotations, XYDiagramPaneBase.Annotations, or SeriesPoint.Annotations). Alternatively, to centrally access all annotations that are present in a chart control, use the ChartControl.AnnotationRepository property.

For more information, refer to Annotations.

See Also