Edit this page

Marked zone

The CartesianMarkedzoneAnnotation is a rectangle defined by the HorizontalFrom/To and VerticalFrom/To properties.

Figure 1: Marked Annotation

chartview-annotations-markedzone-annotations 001

Properties

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

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

  • BackColorL: Defines the back color of the marked zone.

  • BorderColorL Specifies the border color of the marked zone.

  • BorderWidth: Sets the border width of the marked zone.

Examples

In the following example additional styling is applied to the default look of the annotation.

Figure 2: Annotation With All Bounds Set

chartview-annotations-markedzone-annotations 002

Define Annotation

CartesianMarkedZoneAnnotation annotation = new CartesianMarkedZoneAnnotation();
annotation.HorizontalFrom = 4;
annotation.HorizontalTo = 9;
annotation.VerticalFrom = 10;
annotation.VerticalTo = 35;
annotation.BackColor = Color.FromArgb(50, 37, 160, 219);
annotation.BorderDashStyle = DashStyle.Custom;
annotation.BorderDashPattern = new float[] { 9, 3, 2, 4 };
annotation.BorderColor = Color.Orange;
annotation.BorderWidth = 3;
this.radChartView1.Annotations.Add(annotation);

Dim annotation As New CartesianMarkedZoneAnnotation()
annotation.HorizontalFrom = 4
annotation.HorizontalTo = 9
annotation.VerticalFrom = 10
annotation.VerticalTo = 35
annotation.BackColor = Color.FromArgb(50, 37, 160, 219)
annotation.BorderDashStyle = DashStyle.[Custom]
annotation.BorderDashPattern = New Single() {9, 3, 2, 4}
annotation.BorderColor = Color.Orange
annotation.BorderWidth = 3
Me.radChartView1.Annotations.Add(annotation)

The flexible design of the marked zone annotation allows the user to omit one (or more) of the four HorizontalFrom/To and VerticalFrom/To properties. The following table details the relationship between the specified properties and the occupied interval on the axis:

Specified Properties Occupied interval
Both From and To [Min(From,To), Max(From,To)]
Only From [From,+∞]
Only To [-∞, To]

Here is the previous example with some of the settings commented

Horizontally Defined Marked Zone

CartesianMarkedZoneAnnotation annotation = new CartesianMarkedZoneAnnotation();
annotation.HorizontalFrom = 4;
annotation.HorizontalTo = 9;
//annotation.VerticalFrom = 10;
//annotation.VerticalTo = 35;
annotation.BackColor = Color.FromArgb(50, 37, 160, 219);
//annotation.BorderDashStyle = DashStyle.Custom;
//annotation.BorderDashPattern = new float[] { 9, 3, 2, 4 };
annotation.BorderColor = Color.Orange;
annotation.BorderWidth = 1;
this.radChartView1.Annotations.Add(annotation);

Dim annotation As New CartesianMarkedZoneAnnotation()
annotation.HorizontalFrom = 4
annotation.HorizontalTo = 9
'annotation.VerticalFrom = 10;
'annotation.VerticalTo = 35;
annotation.BackColor = Color.FromArgb(50, 37, 160, 219)
'annotation.BorderDashStyle = DashStyle.Custom;
'annotation.BorderDashPattern = new float[] { 9, 3, 2, 4 };
annotation.BorderColor = Color.Orange
annotation.BorderWidth = 1
Me.radChartView1.Annotations.Add(annotation)

Figure 3: Horizontally Defined Marked Zone

chartview-annotations-markedzone-annotations 003

See Also

Was this article helpful? Yes No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy