Version

Binding OLAP Data

Purpose

Demonstrates how to configure the XamPieChart™ control for displaying OLAP data.

Required background

Prerequisite materials required to understand this topic.

Type Content

Concepts

  • OLAP (Online Analytical Processing)

Topic Purpose

The is a specialized control for rendering pie charts, a circle divided into slices; each having an arc length proportional to its underlying data value.

This topic explains the specifics of using the XamPieChart control with OLAP data.

Using the XamPieChart with OLAP Data

OLAP Visuals

Visualizing OLAP data with XamPieChart is done through a new axis type called OlapAxis.

OlapAxis consists of two key properties DataSource and OlapAxisSource.

DataSoure is used for data binding, and OlapAxisSource is used for determining the axis type in data rendering. It is important to set up both of these properties in order to visualize the OLAP data with a pie chart.

The axis type can be either Columns or Rows , referring to the columns or rows from the data source.

Each column in the data source is rendered as an individual pie chart whose rows are represented by the slices; as illustrated below.

PieChart Binding OLAP Data 01.png

The XamPieChart control renders data containing multiple columns as multiple pie charts, one for each column from the data source. As with the previous example, the column’s rows are rendered as the slices in the correspond pies. This behavior is illustrated in the following screen shot.

PieChart Binding OLAP Data 02.png

By default the pie chart displays one column dimension with one row dimension, meaning one pie chart. The columns and rows are not expanded.

For more details, refer to User Interactions with OLAP Data.

Supported OLAP data types

The only supported data source types are:

Property Settings

The minimum required property settings for displaying a pie chart with OLAP data.

In order to: Use this property: And set it to:

Set the data binding with OLAP data source

Your OLAP data

Specify the axis type

Columns or Rows

Code Example

This coding example demonstrates the minimum XamPieChart control’s property settings required to display OLAP data.

In XAML:

<ig:XamOlapPieChart
    DataSource="{Binding DataSource}"
    OlapAxisSource="Columns" />

In C#:

XamOlapPieChart chart = new XamOlapPieChart();
chart.DataSource = new MainViewModel().DataSource;
chart.OlapAxisSource = OlapAxisSource.Columns;

In Visual Basic:

Dim chart As New XamOlapPieChart()
chart.DataSource = New MainViewModel().DataSource
chart.OlapAxisSource = OlapAxisSource.Columns

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic illustrates how to visualize OLAP data using the XamPieChart control.