Spread WPF Documentation
LegendPosition Enumeration
Example Example 


GrapeCity.Windows.SpreadSheet.Data Namespace : LegendPosition Enumeration
Specifies the position of the legend.
Syntax
'Declaration
 
Public Enum LegendPosition 
   Inherits System.Enum
'Usage
 
Dim instance As LegendPosition
public enum LegendPosition : System.Enum 
Members
MemberDescription
BottomThe legend is at the bottom of the chart.
LeftThe legend is at the left of the chart.
NoneSpecifies no legend or the legend is placed outside the chart control.
RightThe legend is at the right of the chart.
TopThe legend is at the top of the chart.
Example
This example uses the LegendPosition enumeration.
GrapeCity.Windows.SpreadSheet.Data.Legend3D l = new GrapeCity.Windows.SpreadSheet.Data.Legend3D();
l.LablePostion = GrapeCity.Windows.SpreadSheet.Data.LegendLabelPosition.Near;
l.Orientation = Orientation.Horizontal;
l.Postion = GrapeCity.Windows.SpreadSheet.Data.LegendPosition.Bottom;
l.Reversed = false;
      
GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries ds1 = new GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries();
ds1.Values = new GrapeCity.Windows.SpreadSheet.Data.DoubleSeriesCollection();
ds1.Values.Add(2);
ds1.Values.Add(3);
ds1.Values.Add(5);
GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries ds2 = new GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries();
ds2.Values = new GrapeCity.Windows.SpreadSheet.Data.DoubleSeriesCollection();
ds2.Values.Add(3);
ds2.Values.Add(6);
ds2.Values.Add(4);
GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries ds3 = new GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries();
ds3.Values = new GrapeCity.Windows.SpreadSheet.Data.DoubleSeriesCollection();
ds3.Values.Add(5);
ds3.Values.Add(1);
ds3.Values.Add(3);
GrapeCity.Windows.SpreadSheet.Data.SpreadSurfaceChart schart = new GrapeCity.Windows.SpreadSheet.Data.SpreadSurfaceChart("SChart", GrapeCity.Windows.SpreadSheet.Data.SpreadSurfaceChartType.Surface, 0, 0, 300, 300);
schart.Legend = l;
schart.PlotFill = new SolidColorBrush(Colors.Orange);
schart.CeilAppearance = GrapeCity.Windows.SpreadSheet.Data.PlaneAppearance.Zone;
schart.DataSeries.Add(ds1);
schart.DataSeries.Add(ds2);
schart.DataSeries.Add(ds3);
GcSpreadSheet1.ActiveSheet.SurfaceCharts.Add(schart);
Dim l As New GrapeCity.Windows.SpreadSheet.Data.Legend3D()
l.LablePostion = GrapeCity.Windows.SpreadSheet.Data.LegendLabelPosition.Near
l.Orientation = Orientation.Horizontal
l.Postion = GrapeCity.Windows.SpreadSheet.Data.LegendPosition.Bottom
l.Reversed = False
      
Dim ds1 As New GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries()
ds1.Values = New GrapeCity.Windows.SpreadSheet.Data.DoubleSeriesCollection()
ds1.Values.Add(2)
ds1.Values.Add(3)
ds1.Values.Add(5)
Dim ds2 As New GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries()
ds2.Values = New GrapeCity.Windows.SpreadSheet.Data.DoubleSeriesCollection()
ds2.Values.Add(3)
ds2.Values.Add(6)
ds2.Values.Add(4)
Dim ds3 As New GrapeCity.Windows.SpreadSheet.Data.SpreadDataSeries()
ds3.Values = New GrapeCity.Windows.SpreadSheet.Data.DoubleSeriesCollection()
ds3.Values.Add(5)
ds3.Values.Add(1)
ds3.Values.Add(3)
Dim schart As New GrapeCity.Windows.SpreadSheet.Data.SpreadSurfaceChart("SChart", GrapeCity.Windows.SpreadSheet.Data.SpreadSurfaceChartType.Surface, 0, 0, 300, 300)
schart.Legend = l
schart.PlotFill = new SolidColorBrush(Colors.Orange)
schart.CeilAppearance = GrapeCity.Windows.SpreadSheet.Data.PlaneAppearance.Zone
schart.DataSeries.Add(ds1)
schart.DataSeries.Add(ds2)
schart.DataSeries.Add(ds3)
GcSpreadSheet1.ActiveSheet.SurfaceCharts.Add(schart)
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         GrapeCity.Windows.SpreadSheet.Data.LegendPosition

See Also

Reference

GrapeCity.Windows.SpreadSheet.Data Namespace