Version

Configuring Chart Types

In this topic

This topic contains the following sections:

Setting Chart Type

As described in the Chart Types topic the chart can render different types of chart with a simple change of a property.

To assign chart type during initialization: In XAML:

<ig:XamCategoryChart x:Name="CategoryChart"
                        ItemsSource="{Binding EnergySampleData}"
                        ChartType="Spline"
</ig:XamCategoryChart>

Look and Feel

To further customize the look of the chart, there are a number of properties available that allow this.

Property Name Property Type Description

Gets or sets the palette of brushes to use for coloring the chart series.

Gets or sets the palette used for coloring negative items of Waterfall chart type.

Gets or sets the palette of brushes to use for outlines on the chart series.

double

Gets or sets the rendering resolution for series in this chart. Where n = Resolution, for every n horizontal pixels, combine all items into a single datapoint. When Resolution = 0, all datapoints will be rendered as graphical objects. Charts with a higher resolution will have faster performance.

double

Gets or sets the thickness of the chart series. Depending on the ChartType, this can be the main brush used, or just the outline. For example, when using a ChartType of "Line," the Thickness property will affect the thickness of the lines drawn, whereas when using a ChartType of "Column," the Thickness property will affect the outer border thickness of the columns.

The following example exercises some of the properties mentioned above using the Line, Area, and Waterfall chart types. To see more configuration options, follow the links at the bottom of this topic. In XAML:

<ig:XamCategoryChart ItemsSource="{Binding EnergySampleData}"
                        ChartType="Area"
                        Brushes="Blue Green"
                        NegativeBrushes="Red Yellow"
                        Outlines="Black"
                        Thickness="3">
categorychart configuring chart types line.png
categorychart configuring chart types area.png
categorychart configuring chart types waterfall.png

Related Content

Topic Purpose

This article will get you up and running with the Category Chart control.

This article describes the available chart types.