# Getting Started

**RadChartView** is essentially a toolset of charting components designed to help you create a variety of rich data-visualization applications. This tutorial will walk you through the creation of a sample application that contains a RadChartView component.

## Chart Types

The RadChartView suite provides four different chart types.

* **RadCartesianChart**
* **RadPieChart**
* **RadPolarChart**
* **RadFunnelChart**

Each of these charting components is designed to best fit specific use cases. You can read more about the charts in the [ChartTypes](https://www.telerik.com/products/wpf/documentation/controls/radchartview/getting-started/chart-types) help article.

## Adding Telerik Assemblies Using NuGet

To use RadChartView when working with NuGet packages, install the `Telerik.Windows.Controls.Chart.for.Wpf.Xaml` package. The [package name may vary](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/available-packages) slightly based on the Telerik dlls set - [Xaml or NoXaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml)

Read more about NuGet installation in the [Installing UI for WPF from NuGet Package](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/nuget-installation) article.

> tip With the 2025 Q1 release, the Telerik UI for WPF has a new licensing mechanism. You can learn more about it [here](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key).

## Adding Assembly References Manually

If you are not using NuGet packages, you can add a reference to the following assemblies:

* **Telerik.Licensing.Runtime**
* **Telerik.Windows.Controls**
* **Telerik.Windows.Controls.Chart**
* **Telerik.Windows.Data**

You can find the required assemblies for each control from the UI for WPF suite in [Controls Dependencies](https://www.telerik.com/products/wpf/documentation/common-information/installation-installing-dependencies-wpf) help article.

## Defining a Chart

For demonstration purposes, this tutorial will use the **RadCartesianChart** component. It uses a Cartesian coordiante system to display different series and it is the most commonly used charting component. **Example 1** demonstrates how to define the RadCartesianChart in XAML.

**Example 1: Chart definition**

```XAML
<telerik:RadCartesianChart></telerik:RadCartesianChart>
```

> The `telerik` namespace points to the telerik schema. `xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"`

If you run the project at this stage, **RadCartesianChart** will inform you that there are no axes defined, as seen in **Figure 1**.

> caption RadCartesianChart without its axes set

![Telerik UI for WPF RadChartView RadCartesianChart showing the message that no axes are defined](https://www.telerik.com/products/wpf/documentation/assets/7656b2903702431894234225521cb92f/radchartview-axisnotsetmessage.png)

The Cartesian coordinate system is constructed using horizontal and vertical axes. **RadChartView** exposes different types of axes that can be combined horizontally and vertically in different ways based on the scenario. You can find more information about them in our [Axis](https://www.telerik.com/products/wpf/documentation/controls/radchartview/axes/axis) article.

This example will demonstrate a common scenario with a LinearAxis as the vertical axis of the chart and a CategoricalAxis as horizontal axis. **Example 2** demonstrates how to define them in XAML.

**Example 2: Chart axes definition**

```XAML
<telerik:RadCartesianChart>
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:CategoricalAxis />
    </telerik:RadCartesianChart.HorizontalAxis>
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis/>
    </telerik:RadCartesianChart.VerticalAxis>
</telerik:RadCartesianChart>
```

In the cases where no series are defined in the definition of the charting components, a message will be displayed to prompt you to enter a series.

> caption RadCartesianChart without any series added in its series collection

![Telerik UI for WPF RadChartView RadCartesianChart showing the message that no series are defined](https://www.telerik.com/products/wpf/documentation/assets/a8a7aab1477d54a86463d44955c729ff/radchartview-noseriesaddedmessage.png)

## Defining a Series

**RadChartView** exposes a large variety of series that can be used in different scenarios. Please take a look at the [Series](https://www.telerik.com/products/wpf/documentation/controls/radchartview/series/chartseries) article to find out more about the available types.

To complete the task of this tutorial, you need to define series with data points that will be rendered inside the charting component. You can do this by manually populating the **Series** collection of the **RadCartesianChart** control.

**Example 3: Sample BarSeries definition**

```XAML
<telerik:RadCartesianChart>
    <telerik:RadCartesianChart.HorizontalAxis>
        <telerik:CategoricalAxis />
    </telerik:RadCartesianChart.HorizontalAxis>
    <telerik:RadCartesianChart.VerticalAxis>
        <telerik:LinearAxis/>
    </telerik:RadCartesianChart.VerticalAxis>

    <telerik:RadCartesianChart.Series>
        <telerik:BarSeries>
            <telerik:BarSeries.DataPoints>
                <telerik:CategoricalDataPoint Category="Apples" Value="20"/>
                <telerik:CategoricalDataPoint Category="Bananas" Value="28"/>
                <telerik:CategoricalDataPoint Category="Oranges" Value="17"/>
                <telerik:CategoricalDataPoint Category="Strawberries" Value="30"/>
            </telerik:BarSeries.DataPoints>
        </telerik:BarSeries>
    </telerik:RadCartesianChart.Series>
</telerik:RadCartesianChart>
```

This chart definition will be rendered on the screen as demonstrated in **Figure 3**.

> caption RadCartesianChart displaying a BarSeries

![Telerik UI for WPF RadChartView RadCartesianChart displaying a BarSeries with categorical data](https://www.telerik.com/products/wpf/documentation/assets/9e31a6cdb5fece99ebef7d90865822c9/radchartview-gettingstartedbarseries.png)

If you feel more confident working with code than with markup, you can achieve the same layout with the snippet from **Example 4**.

**Example 4: Sample chart definition in code**

```C#
RadCartesianChart chart = new RadCartesianChart();
CategoricalAxis catAxis = new CategoricalAxis();
LinearAxis lineAxis = new LinearAxis();
chart.HorizontalAxis = catAxis;
chart.VerticalAxis = lineAxis;

BarSeries barSeries = new BarSeries();
barSeries.DataPoints.Add(new CategoricalDataPoint() { Category = "Apples", Value = 20 });
barSeries.DataPoints.Add(new CategoricalDataPoint() { Category = "Bananas", Value = 28 });
barSeries.DataPoints.Add(new CategoricalDataPoint() { Category = "Oranges", Value = 17 });
barSeries.DataPoints.Add(new CategoricalDataPoint() { Category = "Strawberries", Value = 30 });
chart.Series.Add(barSeries);

this.LayoutRoot.Children.Add(chart);
```

```VB.NET
Dim chart As New RadCartesianChart()
Dim catAxis As New CategoricalAxis()
Dim lineAxis As New LinearAxis()
chart.HorizontalAxis = catAxis
chart.VerticalAxis = lineAxis

Dim barSeries As New BarSeries()
barSeries.DataPoints.Add(New CategoricalDataPoint() With { Key .Category = "Apples", Key .Value = 20 })
barSeries.DataPoints.Add(New CategoricalDataPoint() With { Key .Category = "Bananas", Key .Value = 28 })
barSeries.DataPoints.Add(New CategoricalDataPoint() With { Key .Category = "Oranges", Key .Value = 17 })
barSeries.DataPoints.Add(New CategoricalDataPoint() With { Key .Category = "Strawberries", Key .Value = 30 })
chart.Series.Add(barSeries)

Me.LayoutRoot.Children.Add(chart)
```

In order to use the chartview components in code, you will need to add the required *using* directives that point to the Telerik namespaces.

**Example 5: Required usings for the chartview components**

```C#
using Telerik.Charting;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.ChartView;
```

```VB.NET
Imports Telerik.Charting
Imports Telerik.Windows.Controls
Imports Telerik.Windows.Controls.ChartView
```

## Bind the Chart

Although you can easily populate the **RadCartesianChart Series** directly with DataPoint objects, in most real-life applications, you will populate the series with business data. This is why all series types expose an **ItemsSource** property. You can bind that property to a collection of business items. And if you use a collection that implements the **INotifyCollectionChanged** interface, then any changes within the business data will be immediately reflected in the appropriate **RadChartView** components and vice versa. You can find more information in the [Populating with Data](https://www.telerik.com/products/wpf/documentation/controls/radchartview/populating-with-data/series-databinding) section of our documentation.

## Categorical vs Numerical Data

When choosing the correct series and axes to display your data, it is important to consider whether it is categorical or numerical. Here are some basic definitions for both types:

* **Categorical Data**: A type of data that can be stored into groups or categories with the aid of names or labels.
* **Numerical Data**: A type of data that is expressed in terms of numbers rather than natural language descriptions.

The RadChartView suite provides series and axes to display both kinds of data. You can check out the [Series to Axes Dependencies](https://www.telerik.com/products/wpf/documentation/controls/radchartview/series-and-axes) article, which lists the different types of series and the axes that they support. Most series require one categorical and one numerical axis, however the **Scatter** type series support two numerical axes.

## Telerik UI for WPF Learning Resources

* [Telerik UI for WPF ChartView Component](https://www.telerik.com/products/wpf/chartview.aspx)
* [Getting Started with Telerik UI for WPF Components](https://www.telerik.com/products/wpf/documentation/getting-started/first-steps-nuget)
* [Telerik UI for WPF Installation](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/installation-guide)
* [Telerik UI for WPF and WinForms Integration](https://www.telerik.com/products/wpf/documentation/common-information/winforms-integration/overview)
* [Telerik UI for WPF Visual Studio Templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-templates)
* [Setting a Theme with Telerik UI for WPF](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview)
* [Telerik UI for WPF Virtual Classroom (Training Courses for Registered Users)](https://learn.telerik.com/learn/course/external/view/elearning/16/telerik-ui-for-wpf)
* [Telerik UI for WPF License Agreement](https://www.telerik.com/purchase/license-agreement/wpf-dlw-s)

## See Also

* [Overview](https://www.telerik.com/products/wpf/documentation/controls/radchartview/overview)
* [Series and Axes](https://www.telerik.com/products/wpf/documentation/controls/radchartview/series-and-axes)
* [Rendering](https://www.telerik.com/products/wpf/documentation/controls/radchartview/features/rendering)
* [RadLegend Support](https://www.telerik.com/products/wpf/documentation/controls/radchartview/features/radlegend-support)
* [Dynamic Number of Series](https://www.telerik.com/products/wpf/documentation/controls/radchartview/features/chartseriesprovider)
* [Empty Content](https://www.telerik.com/products/wpf/documentation/controls/radchartview/features/empty-content)
