Version

Chart Title and Subtitle

Topic Overview

Purpose

The title and subtitle feature of the XamCategoryChart control allows you to add information to the top section of the chart control.

When adding a title or subtitle to the chart control, the content of the chart automatically resizes allowing for the title and subtitle information.

Required Background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides conceptual information about the XamCategoryChart control including its main features, minimum requirements, and user functionality.

This topic explains how to bind data to the XamCategoryChart control.

In this topic

This topic contains the following sections:

Property Settings

You can customize the look and feel of the category chart’s subtitle and title in many different ways such as applying different font styles, margins, and alignment. This can be achieved through the following properties:

Property Name Property Type Description

string

Title’s text content.

HorizontalAlignment

Title’s horizontal alignment.

FontFamily

Title’s font name.

double

Title’s font size

FontStyle

Title’s font style such as italic.

FontStretch

Title’s font stretch

FontWeight

Title’s font weight such as bold.

Brush

Title’s text color.

Thickness

Title’s margin.

string

Subtitle’s text content.

Brush

Subtitle’s text color.

FontFamily

Subtitle’s font name.

double

Subtitle’s text size.

FontStyle

Subtitle’s font style such as italic.

FontWeight

Subtitle’s font weight such as bold.

HorizontalAlignment

Subtitle’s horizontal alignment.

Thickness

Subtitle’s margin.

Code Snippet

The following code example shows how to customize the title and subtitle: In XAML:

<ig:XamCategoryChart x:Name="CategoryChart"
                     Title="Energy Use Per Country"
                     TitleForeground="Red"
                     TitleFontFamily="Verdana"
                     TitleFontSize="24"
                     Subtitle="Results over a two year periods"
                     SubtitleForeground="Red"
                     SubtitleFontFamily="Verdana"
                     SubtitleFontSize="16">
</ig:XamCategoryChart>

In C#:

In Visual Basic:

categorychart chart title subtitle 01.png

Related Content

Topic Purpose

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