Version

Configuring Axis Modes

The XamFinancialChart control allows you to choose how the data in your charts is represented along the x-axis and y-axis.

In this topic

This topic contains the following sections:

Axis Modes

In the XamFinancialChart control, you can change the modes of the axes with these properties:

Property Name Property Type Description

FinancialChartXAxisMode

Allows you to choose between Time and Ordinal modes for the x-axis. Time mode will render space along the x-axis for gaps in data (e.g. no stock trading on weekends or holidays). Ordinal mode will collapse date areas where data does not exist.

FinancialChartYAxisMode

Allows you to choose between Numeric and PercentChange modes for the y-axis. Numeric mode will be charted with the exact value of the data. PercentChange mode will display the data as percentage change relative to the first data point provided.

Code Snippet

The following code example shows how to change the XAxisMode and YAxisMode:

In XAML:

<ig:XamFinancialChart x:Name="chart1"
    XAxisMode="Ordinal"
    YAxisMode="PercentChange">
</ig:XamFinancialChart>

In C#:

var chart = new XamFinancialChart();
chart.XAxisMode = FinancialChartXAxisMode.Ordinal;
chart.YAxisMode = FinancialChartYAxisMode.PercentChange;

In Visual Basic:

Dim chart = New XamFinancialChart()
chart.XAxisMode = FinancialChartXAxisMode.Ordinal
chart.YAxisMode = FinancialChartYAxisMode.PercentChange

Related Content