Spread Windows Forms 10.0 Product Documentation
LabelOption Property
Example 


Gets or sets the lable option.
Syntax
'Declaration
 
Public Property LabelOption As LabelOption
'Usage
 
Dim instance As TreemapSeries
Dim value As LabelOption
 
instance.LabelOption = value
 
value = instance.LabelOption
public LabelOption LabelOption {get; set;}
Example
This example creates a treemap chart.
FarPoint.Win.Chart.TreemapSeries series = new FarPoint.Win.Chart.TreemapSeries();
series.Values.AddRange(new double[] { 3.5, 1.2, 0.8, 0.6, 0.5, 1.7, 1.1, 0.7, 1.3, 2.0 });
series.Fills.AddRange(new FarPoint.Win.Chart.Fill[] { new FarPoint.Win.Chart.GradientFill(Color.Red, Color.Orange), null, null});
series.Borders.AddRange(new FarPoint.Win.Chart.Line[] { new FarPoint.Win.Chart.SolidLine(Color.Black), null, null, null, null,null, null, null, new FarPoint.Win.Chart.SolidLine(Color.Yellow), null, null, null, null, new FarPoint.Win.Chart.SolidLine(Color.Aqua) });
series.LabelContainsCategoryName = true;
series.LabelContainsValue = true;
series.LabelOption = FarPoint.Win.Chart.LabelOption.Banner;
FarPoint.Win.Chart.StringCollectionItem collection1 = new FarPoint.Win.Chart.StringCollectionItem();
collection1.AddRange(new String[] { "1st", "", "", "", "", "", "2nd", "", "", "3rd" });
FarPoint.Win.Chart.StringCollectionItem collection2 = new FarPoint.Win.Chart.StringCollectionItem();
collection2.AddRange(new String[] { "Jan", "Feb", "", "", "", "Mar", "Apr", "May", "June", "July" });
FarPoint.Win.Chart.StringCollectionItem collection3 = new FarPoint.Win.Chart.StringCollectionItem();
collection3.AddRange(new String[] { "", "Week1", "Week2", "Week3", "Week4", "", "", "", "", "" });
series.CategoryNames.AddRange(new FarPoint.Win.Chart.StringCollectionItem[] { collection1, collection2, collection3 });
FarPoint.Win.Chart.TreemapPlotArea plotArea = new FarPoint.Win.Chart.TreemapPlotArea();
plotArea.Location = new PointF(0.2f, 0.2f);
plotArea.Size = new SizeF(0.6f, 0.6f);
plotArea.Series.Add(series);
FarPoint.Win.Chart.ChartModel model = new FarPoint.Win.Chart.ChartModel();
model.PlotAreas.Add(plotArea);
FarPoint.Win.Spread.Chart.SpreadChart chart = new FarPoint.Win.Spread.Chart.SpreadChart();
chart.Size = new Size(500, 500);
chart.Location = new Point(50, 50);
chart.Model = model;
fpSpread1.Sheets[0].Charts.Add(chart);
Dim series As New FarPoint.Win.Chart.TreemapSeries()
series.Values.AddRange(New Double() {3.5, 1.2, 0.8, 0.6, 0.5, 1.7, 1.1, 0.7, 1.3, 2.0})
series.Fills.AddRange(New FarPoint.Win.Chart.Fill() {New FarPoint.Win.Chart.GradientFill(Color.Red, Color.Orange), Nothing, Nothing})
series.Borders.AddRange(New FarPoint.Win.Chart.Line() {New FarPoint.Win.Chart.SolidLine(Color.Black), Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, New FarPoint.Win.Chart.SolidLine(Color.Yellow), Nothing, Nothing, Nothing, Nothing, New FarPoint.Win.Chart.SolidLine(Color.Aqua)})
series.LabelContainsCategoryName = True
series.LabelContainsValue = True
series.LabelOption = FarPoint.Win.Chart.LabelOption.Banner
Dim collection1 As New FarPoint.Win.Chart.StringCollectionItem()
collection1.AddRange(New String() {"1st", "", "", "", "", "", "2nd", "", "", "3rd"})
Dim collection2 As New FarPoint.Win.Chart.StringCollectionItem()
collection2.AddRange(New String() {"Jan", "Feb", "", "", "", "Mar", "Apr", "May", "June", "July"})
Dim collection3 As New FarPoint.Win.Chart.StringCollectionItem()
collection3.AddRange(New String() {"", "Week1", "Week2", "Week3", "Week4", "", "", "", "", ""})
series.CategoryNames.AddRange(New FarPoint.Win.Chart.StringCollectionItem() {collection1, collection2, collection3})
Dim plotArea As New FarPoint.Win.Chart.TreemapPlotArea()
plotArea.Location = New PointF(0.2F, 0.2F)
plotArea.Size = New SizeF(0.6F, 0.6F)
plotArea.Series.Add(series)
Dim model As New FarPoint.Win.Chart.ChartModel()
model.PlotAreas.Add(plotArea)
Dim chart As New FarPoint.Win.Spread.Chart.SpreadChart()
chart.Size = New Size(500, 500)
chart.Location = New Point(50, 50)
chart.Model = model
FpSpread1.Sheets(0).Charts.Add(chart)
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

TreemapSeries Class
TreemapSeries Members

 

 


Copyright © GrapeCity, inc. All rights reserved.