<ig:XamFinancialChart x:Name="chart1"
XAxisLabelFontSize="16"
XAxisLabelForeground="Blue"
XAxisLabelFontWeight="Bold"
YAxisLabelFontSize="16"
YAxisLabelForeground="Green"
YAxisLabelFontWeight="Bold">
</ig:XamFinancialChart>
XamFinancialChart コントロールは、チャートの x 軸と y 軸に基づいてチャートの構成、ラベルの書式やスタイルの設定などを詳細に制御することが可能です。デフォルトでは、ラベルを明示的に設定する必要はありません。
XamFinancialChart コントロールでは、以下のプロパティで x 軸および y 軸のラベルの回転角度、マージン、水平/垂直の配置、不透明度、パディングと表示を変更できます。
ファイナンシャル チャートの x 軸および y 軸のラベルのルックアンドフィールのスタイルを設定できます。主にフォント タイプ、フォント サイズ、フォントの太さ、色など異なるフォント スタイルをラベルに適用できます。以下のプロパティを使用します。
XamFinancialChart コントロールでは、Y 軸ラベルが省略された数値を表示するかどうかを指定できます。長すぎるラベル値の場合、YAxisAbbreviateLargeNumbers プロパティ を true に設定すると、この機能を有効にします。このプロパティはデフォルトで true に設定されています。
以下のコード例は、日付設定およびそ他のスタイル プロパティを使用して x 軸ラベルにスタイル設定する方法示します。
XAML の場合:
<ig:XamFinancialChart x:Name="chart1"
XAxisLabelFontSize="16"
XAxisLabelForeground="Blue"
XAxisLabelFontWeight="Bold"
YAxisLabelFontSize="16"
YAxisLabelForeground="Green"
YAxisLabelFontWeight="Bold">
</ig:XamFinancialChart>
C# の場合:
var chart1 = new XamFinancialChart()
chart1.XAxisLabelFontSize = 16;
chart1.XAxisLabelForeground = new SolidColorBrush(Colors.Blue);
chart1.XAxisLabelFontWeight = FontWeights.Bold;
chart1.YAxisLabelFontSize = 16;
chart1.YAxisLabelForeground = new SolidColorBrush(Colors.Green);
chart1.YAxisLabelFontWeight = FontWeights.Bold;
Visual Basic の場合:
Dim chart1 = New XamFinancialChart()
chart1.XAxisLabelFontSize = 16
chart1.XAxisLabelForeground = New SolidColorBrush(Colors.Blue)
chart1.XAxisLabelFontWeight = FontWeights.Bold
chart1.YAxisLabelFontSize = 16
chart1.YAxisLabelForeground = New SolidColorBrush(Colors.Green)
chart1.YAxisLabelFontWeight = FontWeights.Bold
以下のスクリーンショットは、軸ラベルの書式およびスタイルを設定した XamFinancialChart コントロールを示します。