Version

Category Item Highlight Layer

Topic Overview

Purpose

This topic provides information about the category item highlight layer used for interactions. It describes the properties of the category item highlight layer and provides an example of its implementation.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

The UltraDataChart control requires a data object model to be mapped to control’s DataContext property. This article will provide a simple data object model but you can create your own and use it with this sample code instead.

This topic explains various types of Category Series in the UltraDataChart control.

In this topic

This topic contains the following sections:

Overview

Category item highlight layer overview

The CategoryItemHighlightLayer highlights items in series using category axis by either drawing a banded shape or rendering a marker at that position.

The default highlight depends on the type of series. For example, the highlight for a ColumnSeries and a LineSeries is different; for ColumnSeries it is a banded shape, for LineSeries it is a marker. You can override the default highlight by setting the HighlightType property. For more information on this property, see the Properties section below.

Preview

The following image is a preview of the UltraDataChart control rendered with the CategoryItemHighlightLayer added.

Properties

Category item highlight layer summary

The following table summarizes the properties of the CategoryItemHighlightLayer.

Property Name Property Type Description

double

This property specifies the width of the highlight area for the items in a series that are aligned on gridlines. For example LineSeries, AreaSeries and SplineSeries.

This property has no effect if there are series present aligned between gridlines. For example ColumnSeries and WaterfallSeries.

When this property has a value set for it, a banded shape is highlighted around the gridline.

This property specifies what the highlight should look like.

The default uses a marker for series such as LineSeries, and a highlight band series such as ColumnSeries.

bool

This property specifies if the highlight band should snap-to-cursor, instead of snap-to-gridlines.

This property has no effect if there are series present aligned between gridlines. For example, ColumnSeries and WaterfallSeries series.

Example

Example

The following screenshot illustrates how the UltraDataChart control with the CategoryItemHighlightLayer object’s

BandHighlightWidth and Brush properties looks as a result of the following setting:

Property Value

Red

Marker

Following is the code used to implement this example

In VB:

Dim catItemHighlightLayerSeries As New CategoryItemHighlightLayer()
catItemHighlightLayerSeries.HighlightType = CategoryItemHighlightType.Marker;
catItemHighlightLayerSeries.Brush = New SolidColorBrush(Color.Red)
theChart.Series.Add(catItemHighlightLayerSeries)

Related Content

Topic Purpose

This topic provides information about the properties and methods that the interaction feature uses for highlighting, and interacting with the tooltip interactions inherited from the Series class.

This topic provides information about the crosshair layer used for interactions. It describes the properties of the crosshair layer and provides an implementation example.

This topic provides information about the category highlight layer which is used for interactions. It describes the properties of the category highlight layer and provides an example of its implementation.

This topic provides information about the category tooltip layer used for interactions. It describes the properties of the category tooltip layer and provides an example of its implementation.

This topic provides information about the item tooltip layer which is used for interactions. It describes the properties of the item tooltip layer and also provides an example of its implementation.