Edit this page

CustomLine Annotations

The CartesianCustomLineAnnotation is used to for visualizing lines from point to point. These points are defined by the HorizontalFrom/To and VerticalFrom/To properties of annotation.
Rad Chart View-annotations-cartesian-customline-0


Besides the HorizontalFrom/To and VerticalFrom/To properties that are used for defining the line, the CartesianCustomLineAnnotation exposes the following properties:

  • HorizontalAxis and VerticalAxis Used for assosiating the annotation with the chart axes.

    By default the annotation is associated with the RadCartesianChart.HorizontalAxis and RadCartesianChart.VerticalAxis axes, so it is not necessary to specify these properties. They are usually used in a multiple axis scenarios.

  • DashArray A collection of System.Double values that indicate the pattern of dashes and gaps that is used to outline the border of the marked zone.

  • Stroke Specifies the stroke of the marked zone.

  • StrokeThickness S pecifies the stroke thickness of the marked zone.


A CartesianCustomLineAnnotation is defined like this:


<telerik:CartesianCustomLineAnnotation HorizontalFrom="0.5" VerticalFrom="1.5" 
                                       HorizontalTo="1.5" VerticalTo="0.0"/>

<telerik:CartesianCustomLineAnnotation HorizontalFrom="0.0" VerticalFrom="2.25"
                                       HorizontalTo="3.75" VerticalTo="2.25"
                                       DashArray="8 4 2 3"/>

<telerik:CartesianCustomLineAnnotation HorizontalFrom="3.5" VerticalFrom="0.25"
                                       HorizontalTo="3.5"  VerticalTo="3.75"

By default, the Stroke of the CustomLine is #FF828282.

The second declaration shows that you can use the DashArray property to create an interesting Stroke pattern.

The last example in the above code snippet shows that you can use the ZIndex property to place an annotation behind the ChartSeries (by default annotations are placed in front of the ChartSeries).

Rad Chart View-annotations-cartesian-customline-1