Spread for ASP.NET 7.0 Product Documentation
Vertical Property
See Also  Example Support Options
FarPoint.Web.Chart Assembly > FarPoint.Web.Chart Namespace > LegendArea Class : Vertical Property


Glossary Item Box

Gets or sets whether the legend items are layed out vertically or horizontally.

Syntax

Visual Basic (Declaration) 
Public Property Vertical As Boolean
Visual Basic (Usage)Copy Code
Dim instance As LegendArea
Dim value As Boolean
 
instance.Vertical = value
 
value = instance.Vertical
C# 
public bool Vertical {get; set;}

Example

This example sets the Vertical property.
C#Copy Code
FarPoint.Web.Chart.AreaSeries aseries = new FarPoint.Web.Chart.AreaSeries();
aseries.SeriesName = "Series1";
aseries.Values.Add(2);
aseries.Values.Add(4);
aseries.Values.Add(3);
aseries.Values.Add(5);
aseries.AreaFill = new FarPoint.Web.Chart.GradientFill(System.Drawing.Color.Azure, System.Drawing.Color.Bisque);
FarPoint.Web.Chart.AreaSeries aseries1 = new FarPoint.Web.Chart.AreaSeries();
aseries1.SeriesName = "Series2";
aseries1.Values.Add(1);
aseries1.Values.Add(2);
aseries1.Values.Add(4);
aseries1.Values.Add(8);
aseries1.AreaFill = new FarPoint.Web.Chart.GradientFill(System.Drawing.Color.Azure, System.Drawing.Color.Bisque);
aseries.AreaBorder = new FarPoint.Web.Chart.SolidLine(System.Drawing.Color.Blue);
FarPoint.Web.Chart.YPlotArea plotArea = new FarPoint.Web.Chart.YPlotArea();
plotArea.Location = new System.Drawing.PointF(0.2F, 0.2F);
plotArea.Size = new System.Drawing.SizeF(0.6F, 0.6F);
plotArea.Series.Add(aseries);
plotArea.Series.Add(aseries1);
FarPoint.Web.Chart.LabelArea Label = new FarPoint.Web.Chart.LabelArea();
Label.Text = "Area Chart";
Label.Border = new FarPoint.Web.Chart.SolidLine(System.Drawing.Color.Blue);
Label.Fill = new FarPoint.Web.Chart.SolidFill(System.Drawing.Color.Yellow);
Label.Location = new System.Drawing.PointF(0.5F, 0.02F);
Label.TextFont = new System.Drawing.Font("Comic Sans MS", 10);
Label.TextFill = new FarPoint.Web.Chart.SolidFill(System.Drawing.Color.Black);
FarPoint.Web.Chart.LegendArea legend = new FarPoint.Web.Chart.LegendArea();
legend.Location = new System.Drawing.PointF(0.80F, 0.5F);
legend.Border = new FarPoint.Web.Chart.SolidLine(System.Drawing.Color.Blue);
legend.Fill = new FarPoint.Web.Chart.SolidFill(System.Drawing.Color.Yellow);
legend.TextFont = new System.Drawing.Font("Comic Sans MS", 10);
legend.TextFill = new FarPoint.Web.Chart.SolidFill(System.Drawing.Color.Black);
legend.Vertical = true;
FarPoint.Web.Chart.ChartModel model = new FarPoint.Web.Chart.ChartModel();
model.LabelAreas.Add(Label);
model.LegendAreas.Add(legend);
model.PlotAreas.Add(plotArea);
FpChart1.Model = model;
VB.NETCopy Code
Dim aseries As New FarPoint.Web.Chart.AreaSeries
aseries.SeriesName = "Series1"
aseries.Values.Add(2.0)
aseries.Values.Add(4.0)
aseries.Values.Add(3.0)
aseries.Values.Add(5.0)
aseries.AreaFill = New FarPoint.Web.Chart.GradientFill(Color.Azure, Color.Bisque)
Dim aseries1 As New FarPoint.Web.Chart.AreaSeries
aseries1.SeriesName = "Series2"
aseries1.Values.Add(1.0)
aseries1.Values.Add(2.0)
aseries1.Values.Add(4.0)
aseries1.Values.Add(8.0)
aseries1.AreaFill = New FarPoint.Web.Chart.GradientFill(Color.Azure, Color.Bisque)
aseries.AreaBorder = New FarPoint.Web.Chart.SolidLine(Color.Blue)
Dim plotArea As New FarPoint.Web.Chart.YPlotArea()
plotArea.Location = New PointF(0.2F, 0.2F)
plotArea.Size = New SizeF(0.6F, 0.6F)
plotArea.Series.Add(aseries)
plotArea.Series.Add(aseries1)

Dim Label As New FarPoint.Web.Chart.LabelArea()
Label.Text = "Area Chart"
Label.Border = New FarPoint.Web.Chart.SolidLine(System.Drawing.Color.Blue)
Label.Fill = New FarPoint.Web.Chart.SolidFill(System.Drawing.Color.Yellow)
Label.Location = New PointF(0.5F, 0.02F)
Label.TextFont = New System.Drawing.Font("Comic Sans MS", 10)
Label.TextFill = New FarPoint.Web.Chart.SolidFill(System.Drawing.Color.Black)
Dim legend As New FarPoint.Web.Chart.LegendArea()
legend.Location = New PointF(0.8F, 0.5F)
legend.Border = New FarPoint.Web.Chart.SolidLine(System.Drawing.Color.Blue)
legend.Fill = New FarPoint.Web.Chart.SolidFill(System.Drawing.Color.Yellow)
legend.TextFont = New System.Drawing.Font("Comic Sans MS", 10)
legend.TextFill = New FarPoint.Web.Chart.SolidFill(System.Drawing.Color.Black)
legend.Vertical = True
Dim model As New FarPoint.Web.Chart.ChartModel()
model.LabelAreas.Add(Label)
model.LegendAreas.Add(legend)
model.PlotAreas.Add(plotArea)
FpChart1.Model = model

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.