This topic provides information on setting an axis title on the XamDataChart™ control.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
The axis title feature of the XamDataChart control allows you to add contextual information to the x and y axes of the XamDataChart control.
You can customize the axis title by specifying properties of the TitleSettings object such as the angle, font size and position.
The following screenshot is a preview of the XamDataChart control with a title set on the y-axis.
The Title property sets the value of the information areas of the axis.
The following table summarizes the properties of the TitleSettings object available to the axis’s TitleSettings property .
The screenshot, following the table, demonstrates how the XamDataChart control with axis Title and title settings looks as a result of the following settings:
Following is the code that implements this example:
In XAML:
<ig:NumericYAxis x:Name="yAxis" Title="Terawatt Hours (TWh)">
<ig:NumericYAxis.TitleSettings >
<ig:TitleSettings FontSize="15" Angle="270" Position="Bottom" />
</ig:NumericYAxis.TitleSettings>
</ig:NumericYAxis>
In C#:
var yAxis = new NumericYAxis(); yAxis.Title = "Terawatt Hours (TWh)"; yAxis.TitleSettings = new AxisTitleSettings(); yAxis.TitleSettings.Position = AxisTitlePosition.Bottom; yAxis.TitleSettings.Angle = 270; yAxis.TitleSettings.FontSize = 15;
In Visual Basic:
Dim yAxis As New NumericYAxis() yAxis.Title = "Terawatt Hours (TWh)" yAxis.TitleSettings = new AxisTitleSettings() yAxis.TitleSettings.Position = AxisTitlePosition.Bottom yAxis.TitleSettings.Angle = 270 yAxis.TitleSettings.FontSize = 15
The following topics provide additional information related to this topic: