Skip to content

Latest commit

 

History

History
227 lines (177 loc) · 8.55 KB

datachart-chart-tooltips.adoc

File metadata and controls

227 lines (177 loc) · 8.55 KB

Chart Tooltips

This topic explains, with code examples, how to enable the default tooltips in the {DataChartName}™ control and how create custom ones.

Introduction

In the {DataChartName} control, pick:[sl,wpf="tooltips are displayed as long as mouse cursor hovers over series in the {DataChartName} control"] pick:[win-phone,win-universal="tooltips are displayed when the tap and hold gesture is performed within chart plot area. Also, tapping and holding and then moving the finger without releasing will update tooltips values"] .

Tooltips Overview

pick:[sl,wpf="If default tooltips are not sufficient, custom tooltips can be configured as well."] Tooltips can be customized in the following aspects:

  • tooltip content

  • tooltip look-and-feel

The tooltip content is customized by providing custom content to the ToolTip property of the Series object. pick:[xaml="Tooltip look-and-feel is managed through the"] pick:[xaml=" ToolTipStyle"] pick:[xaml="property"] pick:[win-phone="and"] pick:[win-phone=" ToolTipInfoBoxStyle"] pick:[win-phone="property"] pick:[xaml="of the {DataChartName} control."]

Code Example: Displaying Custom Tooltips

This example demonstrates how to deliver in tooltips information about the open, high, low, and close sales volumes for any point of a financial graph. This is achieved by creating custom tooltips that will display the volume value on LineSeries and the open, high, low, and close values on FinancialPriceSeries.

Preview

xamDataChart Chart Tooltips 01

Figure 1: The {DataChartName} control with custom tooltip showing values of Financial Price Series

Steps

  1. Add a custom style for the chart’s Tooltip.

  1. Set the custom tooltip style to the {DataChartName} control. pick:[win-phone="`CrosshairVisibility` must be set to Visible in order to enable tooltips in {DataChartName}."]

  1. Add custom tooltip content to the ToolTip property of the Series object.