ActiveReports for .NET 3 Online Help Request technical support
Markers
User Guide > Concepts > Charts > Chart Appearance > Chart Control Items > Markers

Glossary Item Box

Markers are used to show specific data series values in a chart.

The following code demonstrates how to create a marker object at run time and assign it to the Marker property of the series. The results are shown in the image above.

' Visual Basic
' create the marker object
Dim marker1 As New DataDynamics.ActiveReports.Chart.Marker

' set the marker properties
marker1.Backdrop = New Chart.Graphics.Backdrop(Chart.Graphics.GradientType.Horizontal, _
	Color.Navy, Color.Black)
marker1.Line = New Chart.Graphics.Line(Color.White)
marker1.Label = New Chart.LabelInfo(New Chart.Graphics.Line(Color.Transparent, 0, Chart _
	.Graphics.LineStyle.None), New Chart.Graphics.Backdrop(Chart.Graphics.BackdropStyle _
	.Transparent, Color.White, Color.White, Chart.Graphics.GradientType.Vertical, System _
	.Drawing.Drawing2D.HatchStyle.DottedGrid, Nothing, Chart.Graphics.PicturePutStyle _
	.Stretched), New Chart.FontInfo(Color.White, New Font("Arial", 8.0F)), "{Value}", _
	Chart.Alignment.Center)
marker1.Size = 24
marker1.Style = Chart.MarkerStyle.Diamond

' assign the marker to the series Marker property
Me.ChartControl1.Series(0).Marker = marker1

 

// C#
// create the marker object
DataDynamics.ActiveReports.Chart.Marker marker1 = new DataDynamics.ActiveReports.Chart
	.Marker();

// set the marker properties
marker1.Backdrop = new Chart.Graphics.Backdrop(Chart.Graphics.GradientType.Horizontal, 
	Color.Navy, Color.Black);
marker1.Line = new Chart.Graphics.Line(Color.White);
marker1.Label = new Chart.LabelInfo(new Chart.Graphics.Line(Color.Transparent, 0, Chart
	.Graphics.LineStyle.None), new Chart.Graphics.Backdrop(Chart.Graphics.BackdropStyle
	.Transparent, Color.White, Color.White, Chart.Graphics.GradientType.Vertical, System
	.Drawing.Drawing2D.HatchStyle.DottedGrid, null, Chart.Graphics.PicturePutStyle
	.Stretched), new Chart.FontInfo(Color.White, new Font("Arial", 8F)), "{Value}", Chart
	.Alignment.Center);
marker1.Size = 24;
marker1.Style = Chart.MarkerStyle.Diamond;

// assign the marker to the series Marker property
this.chartControl1.Series[0].Marker = marker1;
©2009. All Rights Reserved.