Version

Final Value Layer

Topic Overview

Purpose

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

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 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 XamDataChart control.

In this topic

This topic contains the following sections:

Overview

Final Value Layer Overview

The FinalValueLayer displays annotations along the chart’s axes that represent the final value of a series on the XamDataChart control.

You can configure the annotations to target a specific series if you want to have multiple final value layers present with different configurations. This can be done be setting the TargetSeries property. For more information on this property, see the Properties section below.

Preview

The following image is a preview of the XamDataChart control with the FinalValueLayer added.

datachart finalvaluelayer xamarin.png

Properties

Final Value Layer Summary

The following table summarizes the properties of the FinalValueLayer layer.

Property Name Property Type Description

FinalValueSelectionMode

The selection mode determines how the final value is identified in your data.

Series

Gets or sets the series to target this annotation to. If null, this annotation targets all series simultaneously.

Brush

This property is used to choose the brush for the annotation’s background color. The default is to use the series brush.

Brush

This property is used to choose the brush for the annotation’s text’s color.

Brush

This property is used to choose the brush for the annotation’s outline color.

Example

Following is the code used in the screenshot above.

<ig:XamDataChart x:Name="theChart">
   <ig:XamDataChart.Axes>
      <ig:CategoryXAxis x:Name="xAxis"
                        ItemsSource="{Binding CategoryData1}"
                        Label="Category">
      </ig:CategoryXAxis>
      <ig:NumericYAxis x:Name="yAxis">
      </ig:NumericYAxis>
   </ig:XamDataChart.Axes>
   <ig:XamDataChart.Series>

      <ig:LineSeries x:Name="lineSeries"
                     ItemsSource="{Binding CategoryData2}"
                     ValueMemberPath="Value"
                     XAxis="{x:Reference xAxis}"
                     YAxis="{x:Reference yAxis}">
      </ig:LineSeries>

      <ig:FinalValueLayer TargetSeries="{x:Reference lineSeries}"/>
   </ig:XamDataChart.Series>
</ig:XamDataChart>

In C#:

var finalValue = new FinalValueLayer();
finalValue.TargetSeries = theChart.Series[0];
theChart.Series.Add(finalValue);
Topic Purpose

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

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.