This topic demonstrates, with code examples, how to configure and customize the markers for UltraSparkline™ control.
The following table lists the topics required as a prerequisite to understanding this topic.
Markers, as it is explained in Defining Markers topic, are symbols (circular colored icons) overlaid on the Sparkline to indicate the individual data points based on X/Y coordinates.
Markers can be customized to have an appearance of your choice. By default, markers are not set to display. In order to display any marker, you need to set the visibility property to Visible such as the following:`MarkerVisibility``="Visible"`
Markers can be configured in the following aspects:
Brush
Size
The following table maps the configuration tasks to the corresponding markers’ property settings.
The code below demonstrates how to configure the first, last and negative markers.
In C#
this.ultraSparkline2.DataSource = new TestData();
this.ultraSparkline2.ValueMemberPath = "Value";
this.ultraSparkline2.DisplayType = Infragistics.Win.DataVisualization.SparklineDisplayType.Line;
this.ultraSparkline2.NegativeMarkerVisibility = Infragistics.Portable.Components.UI.Visibility.Visible;
this.ultraSparkline2.NegativeMarkerSize = 15;
this.ultraSparkline2.NegativeMarkerBrush = System.Drawing.Color.FromArgb(255,255,255,0);
this.ultraSparkline2.FirstMarkerVisibility = Infragistics.Portable.Components.UI.Visibility.Visible;
this.ultraSparkline2.FirstMarkerSize = 15;
this.ultraSparkline2.FirstMarkerBrush = System.Drawing.Color.FromArgb(255, 0, 0, 0);
this.ultraSparkline2.LastMarkerVisibility = Infragistics.Portable.Components.UI.Visibility.Visible;
this.ultraSparkline2.LastMarkerSize = 15;
this.ultraSparkline2.LastMarkerBrush = System.Drawing.Color.FromArgb(255, 128, 128, 128);
In Visual Basic
me.ultraSparkline2.DataSource = new TestData()
me.ultraSparkline2.ValueMemberPath = "Value"
me.ultraSparkline2.DisplayType = Infragistics.Win.DataVisualization.SparklineDisplayType.Line
me.ultraSparkline2.NegativeMarkerVisibility = Infragistics.Portable.Components.UI.Visibility.Visible
me.ultraSparkline2.NegativeMarkerSize = 15
me.ultraSparkline2.NegativeMarkerBrush = System.Drawing.Color.FromArgb(255,255,255,0)
me.ultraSparkline2.FirstMarkerVisibility = Infragistics.Portable.Components.UI.Visibility.Visible
me.ultraSparkline2.FirstMarkerSize = 15
me.ultraSparkline2.FirstMarkerBrush = System.Drawing.Color.FromArgb(255, 0, 0, 0)
me.ultraSparkline2.LastMarkerVisibility = Infragistics.Portable.Components.UI.Visibility.Visible
me.ultraSparkline2.LastMarkerSize = 15
me.ultraSparkline2.LastMarkerBrush = System.Drawing.Color.FromArgb(255, 128, 128, 128)
The following topics provide additional information related to this topic.