Version

Configuring Axis Label Format

Purpose

This topic explains how to configure the axis label format in the XamScatterSurface3D™ control.

Required background

The following topics are prerequisites to understanding this topic:

Topic Purpose

This topic provides detailed instructions to help you get up and running as soon as possible with the xamScatterSurface3D™ control.

This topic explains the features supported by the control from developer perspective.

This topic provides an overview of the visual elements of the control.

The following table lists the online articles required as a prerequisite to understanding this topic.

In this topic

This topic contains the following sections:

Configuring Axis Label Format

Overview

Use the SurfaceChartAxis LabelFormat property to format the axis labels in the xamScatterSurface3D control.

Note
Note

Curly braces ('{' and '}') in XAML are special characters for markup extensions. If the first value of a string needs to be a curly brace, an empty set of curly braces must be used as an escape sequence. This allows the text following the empty set of curly braces to be taken as a literal value.

Property settings

The following table maps the desired configuration to the property settings that manage it.

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

Format the axis label

string

Example

The screenshot below demonstrates how the axis label looks as a result of the following settings:

Property Value

X Axis Label Format

{0:P0}

Y Axis Label Format

{0:N2}

Z Axis Label Format

{0:C}

Configuring Axis Label Format 1.png

Following is the code that implements this example.

In XAML:

<ig:XamScatterSurface3D Name="SurfaceChart"
 ItemsSource="{Binding Path=DataCollection}"
 XMemberPath="X" YMemberPath="Y" ZMemberPath="Z" >
    <ig:XamScatterSurface3D.XAxis>
        <ig:LinearAxis Title="X" LabelFormat="{}{0:P0}"/>
    </ig:XamScatterSurface3D.XAxis>
    <ig:XamScatterSurface3D.YAxis>
        <ig:LinearAxis Title="Y" LabelFormat="{}{0:N2}"/>
    </ig:XamScatterSurface3D.YAxis>
    <ig:XamScatterSurface3D.ZAxis>
        <ig:LinearAxis Title="Z" LabelFormat="{}{0:C}"/>
    </ig:XamScatterSurface3D.ZAxis>
</ig:XamScatterSurface3D>

In C#:

…
var linearAxisX = new LinearAxis();
var linearAxisY = new LinearAxis();
var linearAxisZ = new LinearAxis();
linearAxisX.LabelFormat = "{0:P0}";
linearAxisY.LabelFormat = "{0:N2}";
linearAxisZ.LabelFormat = "{0:C}";
SurfaceChart.XAxis = linearAxisX;
SurfaceChart.YAxis = linearAxisY;
SurfaceChart.ZAxis = linearAxisZ;

In Visual Basic:

…
Dim linearAxisX = New LinearAxis()
Dim linearAxisY = New LinearAxis()
Dim linearAxisZ = New LinearAxis()
linearAxisX.LabelFormat = "{0:P0}"
linearAxisY.LabelFormat = "{0:N2}"
linearAxisZ.LabelFormat = "{0:C}"
SurfaceChart.XAxis = linearAxisX
SurfaceChart.YAxis = linearAxisY
SurfaceChart.ZAxis = linearAxisZ

Related Content

Topics

The following topics provide additional information related to this topic.

Topic Purpose

This topic explains how to configure the axis label background and foreground brush in the xamScatterSurface3D control.

This topic explains how to configure the axis label font settings in the xamScatterSurface3D control.

This topic explains how to configure the label offset from its axis in the xamScatterSurface3D control.

This topic explains how to configure the axis label visibility and opacity in the xamScatterSurface3D control.

This topic explains how to re-template the axis label in the xamScatterSurface3D control.