Version

Common Properties

Purpose

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

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

The XamDataChart control requires a data object model to be mapped to control’s BindingContext 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 XamDataChart control.

Overview

Common properties overview

The touch interactions layers inherit those Series base class properties and methods that are relevant in the context of touch interactions. For example, touch interactions, by design do not interact with the touch position, so they do not raise the touch events. Also, the touch interaction layers do not display data directly, so methods such as ScrollIntoView are not applicable for this feature.

Common Properties

Common Items summary

The following table summarizes the Series class properties inherited by the touch interaction classes.

Property Name Property Type Description

Brush

The touch interaction layers inherit their Brush from the series with whom they are interacting. However, this can be overridden by setting the Brush property directly.

Brush

This property follows the same guidelines as the Brush property, listed above.

Point

This property specifies the world position to use instead of the default touch position (NaN, NaN). When this property is set, it fixes the particular layer on the provided world position.

Note
Note:

A world position contains x and y values which range from 0 to 1 representing the global position of the cursor relative to the entire ranges of the axes.

bool

This property specifies if the series default crosshair should be disabled when there is a touch interactions layer on the chart. The default value is True.

bool

This property specifies if the touch interactions layer should use a series index and reserve a color in the Brushes collection that is assigned to the XamDataChart control. The default value is False.

bool

This property specifies if the touch interactions layer should appear in the legend. When this property is set to true, it also indexes the series as it is required to appear in the legend. In order be recognized in the legend you must assign a single color to the series. The default value is False.

Setting the Inherited Properties on a Crosshair Layer

Example

The following screenshot illustrates how the XamDataChart control’s CrosshairLayer looks using the following settings:

Property Value

0.55, 0.55

True

XF Common Properties 1.png

Following is the code used in this implementation

In XAML:

<ig:CrosshairLayer VerticalLineVisiblity="Collapsed"
                   Legend="{x:Reference TitleLegend}"
                   UseLegend="True"
                   CursorPosition="0.55, 0.55"/>

In C#:

var crosshairLayerSeries = new CrosshairLayer();
crosshairLayerSeries.UseLegend = True;
crosshairLayerSeries.CursorPosition = new Point(0.55, 0.55);
chart.Series.Add(crosshairLayerSeries);

Related Content

Topics

Topic Purpose

This topic provides conceptual information about the touch interactions available on the XamDataChart™ control including the different types of touch interaction layers available.

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

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

This topic provides information about the category tooltip layer used for touch 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 touch interactions. It describes the properties of the item tooltip layer and also provides an example of its implementation.