GrapeCity.Xaml.SpreadSheet.Data
ShowCategoryName Property (DataLabelSettings)
Example 


Gets or sets a value that indicates whether to show the category name.
Syntax
'Declaration
 
Public Property ShowCategoryName As Boolean
'Usage
 
Dim instance As DataLabelSettings
Dim value As Boolean
 
instance.ShowCategoryName = value
 
value = instance.ShowCategoryName
public bool ShowCategoryName {get; set;}

Property Value

true to show the category name; otherwise, false.
Example
This example sets the ShowCategoryName property.
GrapeCity.Xaml.SpreadSheet.Data.SpreadChart chart = new GrapeCity.Xaml.SpreadSheet.Data.SpreadChart("Chart", GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.Bubble, 0, 0, 200, 200);
GrapeCity.Xaml.SpreadSheet.Data.SpreadDataSeries ds = new GrapeCity.Xaml.SpreadSheet.Data.SpreadDataSeries();
ds.Values.Add(4);
ds.Values.Add(7);
ds.Values.Add(6);
ds.Values.Add(10);
ds.Values.Add(4);

//DataSeries level
ds.DataLabelSettings = new GrapeCity.Xaml.SpreadSheet.Data.DataLabelSettings();
ds.DataLabelSettings.ShowValue = true;
ds.DataLabelSettings.ShowSeriesName = true;
ds.DataLabelSettings.ShowPercent = true;
ds.DataLabelSettings.ShowCategoryName = true;
ds.DataLabelSettings.ShowBubbleSize = true;

ds.DataLabelStyle.Fill = new SolidColorBrush(Windows.UI.Colors.Green);
ds.DataLabelStyle.Stroke = new SolidColorBrush(Windows.UI.Colors.Purple);
ds.DataLabelStyle.StrokeDashType = GrapeCity.Xaml.SpreadSheet.Data.StrokeDashType.Dot;
ds.DataLabelStyle.StrokeThickness = 2;
ds.DataLabelStyle.FontSize = 12;
ds.DataLabelStyle.FontFamily = new FontFamily("Arial Narrow");
ds.DataLabelStyle.FontStyle = Windows.UI.Text.FontStyle.Italic;
ds.DataLabelStyle.FontWeight = Windows.UI.Text.FontWeights.Bold;
ds.DataLabelStyle.FontStretch = Windows.UI.Text.FontStretch.Normal;
ds.DataLabelStyle.Foreground = new SolidColorBrush(Windows.UI.Colors.Blue);

//DataLabel level
GrapeCity.Xaml.SpreadSheet.Data.DataLabel dataLabel = ds.GetDataLabel(0);
dataLabel.DataLabelSettings = new GrapeCity.Xaml.SpreadSheet.Data.DataLabelSettings();
dataLabel.DataLabelSettings.ShowValue = false;
dataLabel.DataLabelSettings.ShowSeriesName = true;
dataLabel.DataLabelSettings.ShowPercent = true;
dataLabel.DataLabelSettings.ShowCategoryName = true;
dataLabel.DataLabelSettings.ShowBubbleSize = true;

dataLabel.Fill = new SolidColorBrush(Windows.UI.Colors.Transparent);
dataLabel.Stroke = new SolidColorBrush(Windows.UI.Colors.Red);
dataLabel.StrokeDashType = GrapeCity.Xaml.SpreadSheet.Data.StrokeDashType.Dash;
dataLabel.StrokeThickness = 2;
dataLabel.FontSize = 10;
dataLabel.FontFamily = new FontFamily("Arial Narrow");
dataLabel.FontStyle = Windows.UI.Text.FontStyle.Italic;
dataLabel.FontWeight = Windows.UI.Text.FontWeights.Bold;
dataLabel.FontStretch = Windows.UI.Text.FontStretch.Normal;
dataLabel.Foreground = new SolidColorBrush(Windows.UI.Colors.DarkGray);
chart.DataSeries.Add(ds);
gcSpreadSheet1.ActiveSheet.Charts.Add(chart);
Dim chart As New GrapeCity.Xaml.SpreadSheet.Data.SpreadChart("Chart", GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.Bubble, 0, 0, 200, 200)

Dim ds As New GrapeCity.Xaml.SpreadSheet.Data.SpreadDataSeries()
ds.Values.Add(4)
ds.Values.Add(7)
ds.Values.Add(6)
ds.Values.Add(10)
ds.Values.Add(4)

'DataSeries level
ds.DataLabelSettings = New GrapeCity.Xaml.SpreadSheet.Data.DataLabelSettings()
ds.DataLabelSettings.ShowValue = True
ds.DataLabelSettings.ShowSeriesName = True
ds.DataLabelSettings.ShowPercent = True
ds.DataLabelSettings.ShowCategoryName = True
ds.DataLabelSettings.ShowBubbleSize = True

ds.DataLabelStyle.Fill = New SolidColorBrush(Windows.UI.Colors.Green)
ds.DataLabelStyle.Stroke = New SolidColorBrush(Windows.UI.Colors.Purple)
ds.DataLabelStyle.StrokeDashType = GrapeCity.Xaml.SpreadSheet.Data.StrokeDashType.Dot
ds.DataLabelStyle.StrokeThickness = 2
ds.DataLabelStyle.FontSize = 12
ds.DataLabelStyle.FontFamily = New FontFamily("Arial Narrow")
ds.DataLabelStyle.FontStyle = Windows.UI.Text.FontStyle.Italic
ds.DataLabelStyle.FontWeight = Windows.UI.Text.FontWeights.Bold
ds.DataLabelStyle.FontStretch = Windows.UI.Text.FontStretch.Normal
ds.DataLabelStyle.Foreground = New SolidColorBrush(Windows.UI.Colors.Blue)

'DataLabel level
Dim dataLabel = ds.GetDataLabel(0)
dataLabel.DataLabelSettings = New GrapeCity.Xaml.SpreadSheet.Data.DataLabelSettings()
dataLabel.DataLabelSettings.ShowValue = False
dataLabel.DataLabelSettings.ShowSeriesName = True
dataLabel.DataLabelSettings.ShowPercent = True
dataLabel.DataLabelSettings.ShowCategoryName = True
dataLabel.DataLabelSettings.ShowBubbleSize = True

dataLabel.Fill = New SolidColorBrush(Windows.UI.Colors.Transparent)
dataLabel.Stroke = New SolidColorBrush(Windows.UI.Colors.Red)
dataLabel.StrokeDashType = GrapeCity.Xaml.SpreadSheet.Data.StrokeDashType.Dash
dataLabel.StrokeThickness = 2
dataLabel.FontSize = 10
dataLabel.FontFamily = New FontFamily("Arial Narrow")
dataLabel.FontStyle = Windows.UI.Text.FontStyle.Italic
dataLabel.FontWeight = Windows.UI.Text.FontWeights.Bold
dataLabel.FontStretch = Windows.UI.Text.FontStretch.Normal
dataLabel.Foreground = New SolidColorBrush(Windows.UI.Colors.DarkGray)
chart.DataSeries.Add(ds)
GcSpreadSheet1.ActiveSheet.Charts.Add(chart)
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

DataLabelSettings Class
DataLabelSettings Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options