Version

Configuring Markers

Purpose

This topic demonstrates, with code examples, how to configure and customize the markers for UltraSparkline™ control.

Required background

The following table lists the topics required as a prerequisite to understanding this topic.

Topic Purpose

This topic provides an overview of the UltraSparkline control, its benefits, and the supported chart types.

This topic provides an overview of the possible ways to configure the UltraSparkline control. Links to the detailed configurations (available in separate topics) are provided as well.

This topic demonstrates, with code examples, how to define the markers for UltraSparkline control.

Configuring Markers – Conceptual Overview

Overview

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

Property settings

The following table maps the configuration tasks to the corresponding markers’ property settings.

In order to: Use this property: And set it to:

Change the color of the marker

The brush value

Change the size of the marker

The desired numeric value

Configuring the Markers – Code Example

Description

The code below demonstrates how to configure the first, last and negative markers.

Preview

Configuring Markers 1.png

Code

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)

Related Content

The following topics provide additional information related to this topic.

Topic Purpose

This topic provides an overview of the UltraSparkline control, its benefits, and the supported chart types.

This topic provides an overview of the possible ways to configure the UltraSparkline control. Links to the detailed configurations (available in separate topics) are provided as well.

This topic explains the featured properties of the UltraSparkline control.