Version

Getting Started with XamFinancialChart

Purpose

This topic explains using a code example how to add the XamFinancialChart control to WPF applications.

Adding XamFinancialChart to the WPF application

Introduction

The following procedure demonstrates adding the XamFinancialChart to WPF applications.

Preview

The following is a screenshot of the XamFinancialChart

financialchart wpf multidata.png

Requirements

Following are the general requirements for adding the XamFinancialChart control.

Add the following NuGet package reference to your application:

  • Infragistics.WPF.FinancialChart

For more information on setting up the NuGet feed and adding NuGet packages, you can take a look at the following documentation: NuGet Feeds.

In XAML:

xmlns:ig="http://schemas.infragistics.com/xaml"

In C#:

using Infragistics.Controls.Charts;

In VB:

Imports Infragistics.Controls.Charts

Overview

Following is a conceptual overview of the process:

1. Adding the XamFinancialChart control to WPF applications

2. Verifying the results

Steps

The following procedure takes you through the steps necessary for adding the XamFinancialChart control to a page.

1. Add the XamFinancialChart control to the page.

The following code demonstrates adding the XamFinancialChart control with the minimum code and property settings required for display.

In XAML:

<Grid x:Name=”LayoutRoot”>
 <ig:XamFinancialChart ItemsSource="{Binding DataCollection}" />
</Grid>

In Visual Basic:

Dim financialChart As New XamFinancialChart()
financialChart.ItemsSource = data
Me.LayoutRoot.Children.Add(financialChart)

In C#:

var financialChart = new XamFinancialChart();
financialChart.ItemsSource = data;
this.LayoutRoot.Children.Add(financialChart);

2. Verify the results.

Build and run your project to verify the result. If you have implemented the steps correctly, the displayed XamFinancialChart should look like the one in the Preview section above.

Related Content

Topics

The following topics provide additional information related to this topic:

Topic Purpose

This topic describes in detail how to bind the control to data.

This topic provides a conceptual overview of the Financial Chart control.