Spread WPF Documentation
LabelFormatter Property
Example 


Gets or sets the label formatter.
Syntax
'Declaration
 
Public Property LabelFormatter As IFormatter
'Usage
 
Dim instance As Axis
Dim value As IFormatter
 
instance.LabelFormatter = value
 
value = instance.LabelFormatter
public IFormatter LabelFormatter {get; set;}
Example
This example sets the LabelFormatter property.
GrapeCity.Windows.SpreadSheet.Data.SpreadChart chart = new GrapeCity.Windows.SpreadSheet.Data.SpreadChart("Chart", GrapeCity.Windows.SpreadSheet.Data.SpreadChartType.BarStacked, "Sheet1!$A$1:$A$7", 0,0, 200, 200);
gcSpreadSheet1.ActiveSheet.SetArray(0, 0, new object[,] { { 1 }, { 2 }, { 3 }, { 4 }, { 5 }, { 6 }, { 7 }, { 8 }, { 9 }, { 10 } });

chart.ChartTitle = new GrapeCity.Windows.SpreadSheet.Data.ChartTitle();
chart.AxisX.Text = "-1234";
//stroke
chart.AxisX.StrokeDashType = GrapeCity.Windows.SpreadSheet.Data.StrokeDashType.Dash;
chart.AxisX.StrokeThickness = 2;
chart.AxisX.Stroke = new SolidColorBrush(Colors.Cyan);
//fill
chart.AxisX.Fill = new SolidColorBrush(Colors.Red);
//font
chart.AxisX.FontSize = 12;
chart.AxisX.FontFamily = FontFamily;
chart.AxisX.FontStyle = FontStyles.Italic;
chart.AxisX.FontWeight = FontWeights.Bold;
chart.AxisX.FontStretch = FontStretches.ExtraExpanded;
chart.AxisX.Foreground = new SolidColorBrush(Colors.Blue);
chart.AxisX.LineCapType = PenLineCap.Round;
chart.AxisX.LineJoinType = PenLineJoin.Bevel;
chart.AxisX.LabelAngle = 60;
chart.AxisX.LabelFormatter = new GrapeCity.Windows.SpreadSheet.Data.GeneralFormatter("##.00");
chart.AxisX.Reversed = true;
chart.AxisX.LogBase = 100;
chart.AxisX.UseLogBase = true;
gcSpreadSheet1.ActiveSheet.Charts.Add(chart);
Dim chart As New GrapeCity.Windows.SpreadSheet.Data.SpreadChart("Chart", GrapeCity.Windows.SpreadSheet.Data.SpreadChartType.BarStacked, "Sheet1!$A$1:$A$7", 0, 0, 200, 200)
GcSpreadSheet1.ActiveSheet.SetArray(0, 0, New Object(,) {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}})

chart.ChartTitle = New GrapeCity.Windows.SpreadSheet.Data.ChartTitle()
chart.AxisX.Text = "-1234"
'stroke
chart.AxisX.StrokeDashType = GrapeCity.Windows.SpreadSheet.Data.StrokeDashType.Dash
chart.AxisX.StrokeThickness = 2
chart.AxisX.Stroke = New SolidColorBrush(Colors.Cyan)
'fill
chart.AxisX.Fill = New SolidColorBrush(Colors.Red)
'font
chart.AxisX.FontSize = 12
chart.AxisX.FontFamily = FontFamily
chart.AxisX.FontStyle = FontStyles.Italic
chart.AxisX.FontWeight = FontWeights.Bold
chart.AxisX.FontStretch = FontStretches.ExtraExpanded
chart.AxisX.Foreground = New SolidColorBrush(Colors.Blue)
chart.AxisX.LineCapType = PenLineCap.Round
chart.AxisX.LineJoinType = PenLineJoin.Bevel
chart.AxisX.LabelAngle = 60
chart.AxisX.LabelFormatter = New GrapeCity.Windows.SpreadSheet.Data.GeneralFormatter("##.00")
chart.AxisX.Reversed = True
chart.AxisX.LogBase = 100
chart.AxisX.UseLogBase = True
GcSpreadSheet1.ActiveSheet.Charts.Add(chart)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

Axis Class
Axis Members

 

 


Copyright © GrapeCity, inc. All rights reserved.