AnnotationRepository.Add(Annotation) Method
Appends the specified annotation to the current collection.
Namespace: DevExpress.XtraCharts
Assembly: DevExpress.XtraCharts.v24.2.dll
Declaration
Parameters
Name | Type | Description |
---|---|---|
annotation | Annotation | An Annotation class descendant to append to the collection. |
Returns
Type | Description |
---|---|
Int32 | An integer value indicating the position at which the new element was inserted. |
Remarks
The Add method adds TextAnnotation and ImageAnnotation objects to a chart control’s AnnotationRepository, where all annotations that are present in a chart control can be centrally accessed (via the ChartControl.AnnotationRepository property).
Alternatively, you can add annotations directly to an element’s annotations collection, via its AnnotationCollection.AddImageAnnotation or AnnotationCollection.AddTextAnnotation method.
For more information, refer to Annotations.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Add(Annotation) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.