Skip to content

Latest commit

 

History

History
312 lines (233 loc) · 8.87 KB

datachart-navigating-chart-using-code.adoc

File metadata and controls

312 lines (233 loc) · 8.87 KB

Navigating Chart Using Code

Topic Overview

Purpose

This topic provides information how to navigate content in the {DataChartName}™ control in code-behind.

Required background

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

Topic Purpose

This topic provides an overview of key features in the {DataChartName} control.

This topic provides information on using navigation in the {DataChartName} control.

In this topic

This topic contains the following sections

Navigation Properties

The {DataChartName} control provide several navigation properties that are updated each time a panning or zooming action is performed on the chart. The following table list navigation properties in the chart control:

Property Type Description Default Value

double

The X portion of the content view rectangle displayed by the {DataChartName} control.

NaN

Displays the chart content positioned left to the X axis.

double

The Y portion of the content view rectangle displayed by the {DataChartName} control.

NaN

Displays the chart content positioned above the Y axis.

Rect

The portion of the {DataChartName} that is currently in view.

0, 0, 1, 1

Displays the entire chart content.

double

The width portion of the content view rectangle displayed by the {DataChartName} control.

NaN

Displays the chart content positioned along the X axis.

double

The height portion of the content view rectangle displayed by the {DataChartName} control.

NaN

Displays the chart content along the Y axis.

xamDataChart RT Chart Navigation 01

Figure 1: The {DataChartName} control with the navigation properties’ values visible

Code Example

Navigation of the {DataChartName} control can be managed from code-behind by changing values of the properties listed in Table 2. The following code snippets demonstrate how to zoom and pan chart from code-behind.