ComponentOne FlexChart for WinForms
Customizing Annotations
FlexChart > Working with FlexChart > FlexChart Elements > Annotations > Customizing Annotations

FlexChart annotations are customizable in terms of dimensions (for shapes), scaling (for images), and content style (for all except images).

The following image displays the Rectangle annotation customized to further highlight the maximum tax revenue in the year, 2013.

The following code compares tax revenue data of nine consecutive years to display the maximum tax revenue. The code shows how to set the Rectangle annotation's dimensions, customize its appearance and content.

' specify the annotation dimensions
rect.Height = 50
rect.Width = 140

' customize the annotation style and content style
rect.Style.FillColor = Color.FromArgb(200, Color.DarkBlue)
rect.Style.StrokeColor = Color.OrangeRed
rect.Style.StrokeWidth = 2
rect.Style.StrokeDashPattern = New Single() {1.0F, 2.0F}
rect.ContentStyle.StrokeColor = Color.Yellow
rect.ContentStyle.Font = New System.Drawing.Font(FontFamily.GenericSansSerif, 8.5F, FontStyle.Bold)
// specify the annotation dimensions
rect.Height = 50;
rect.Width = 140;

// customize the annotation style and content style
rect.Style.FillColor = Color.FromArgb(200, Color.DarkBlue);
rect.Style.StrokeColor = Color.OrangeRed;
rect.Style.StrokeWidth = 2;
rect.Style.StrokeDashPattern = new[] { 1f, 2f };
rect.ContentStyle.StrokeColor = Color.Yellow;
rect.ContentStyle.Font = new System.Drawing.Font(FontFamily.GenericSansSerif, 8.5F, FontStyle.Bold);