GrapeCity.Windows.SpreadSheet.Data Namespace > SpreadSurfaceChart Class : ColorPalette Property |
'Declaration Public Property ColorPalette As System.Collections.Generic.List(Of Color)
'Usage Dim instance As SpreadSurfaceChart Dim value As System.Collections.Generic.List(Of Color) instance.ColorPalette = value value = instance.ColorPalette
public System.Collections.Generic.List<Color> ColorPalette {get; set;}
List<System.Windows.Media.Color> colors = new List<System.Windows.Media.Color>(); colors.Add(System.Windows.Media.Colors.Magenta); colors.Add(System.Windows.Media.Colors.Blue); colors.Add(System.Windows.Media.Colors.Red); colors.Add(System.Windows.Media.Colors.Yellow); colors.Add(System.Windows.Media.Colors.Green); colors.Add(System.Windows.Media.Colors.Orange); GrapeCity.Windows.SpreadSheet.Data.Axis3D ax3d = new GrapeCity.Windows.SpreadSheet.Data.Axis3D(); ax3d.MajorTickAppearance = GrapeCity.Windows.SpreadSheet.Data.TickAppearance.Line; ax3d.MajorGridlinesStroke = new SolidColorBrush(System.Windows.Media.Colors.Orange); GrapeCity.Windows.SpreadSheet.Data.Axis3D ax3d1 = new GrapeCity.Windows.SpreadSheet.Data.Axis3D(); ax3d1.MajorTickAppearance = GrapeCity.Windows.SpreadSheet.Data.TickAppearance.Dot; ax3d1.MajorGridlinesStroke = new SolidColorBrush(System.Windows.Media.Colors.Red); GrapeCity.Windows.SpreadSheet.Data.Axis3D ax3d2 = new GrapeCity.Windows.SpreadSheet.Data.Axis3D(); ax3d2.MajorTickAppearance = GrapeCity.Windows.SpreadSheet.Data.TickAppearance.Line; ax3d2.MajorGridlinesStroke = new SolidColorBrush(System.Windows.Media.Colors.Purple); 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.AxisX = ax3d; schart.AxisY = ax3d1; schart.AxisZ = ax3d2; schart.ColorPalette = colors; schart.DataSeries.Add(ds1); schart.DataSeries.Add(ds2); schart.DataSeries.Add(ds3); this.GcSpreadSheet1.ActiveSheet.SurfaceCharts.Add(schart);
Dim colors As New List(Of System.Windows.Media.Color)() colors.Add(System.Windows.Media.Colors.Magenta) colors.Add(System.Windows.Media.Colors.Blue) colors.Add(System.Windows.Media.Colors.Red) colors.Add(System.Windows.Media.Colors.Yellow) colors.Add(System.Windows.Media.Colors.Green) colors.Add(System.Windows.Media.Colors.Orange) Dim ax3d As New GrapeCity.Windows.SpreadSheet.Data.Axis3D() ax3d.MajorTickAppearance = GrapeCity.Windows.SpreadSheet.Data.TickAppearance.Line ax3d.MajorGridlinesStroke = New SolidColorBrush(System.Windows.Media.Colors.Orange) Dim ax3d1 As New GrapeCity.Windows.SpreadSheet.Data.Axis3D() ax3d1.MajorTickAppearance = GrapeCity.Windows.SpreadSheet.Data.TickAppearance.Dot ax3d1.MajorGridlinesStroke = New SolidColorBrush(System.Windows.Media.Colors.Red) Dim ax3d2 As New GrapeCity.Windows.SpreadSheet.Data.Axis3D() ax3d2.MajorTickAppearance = GrapeCity.Windows.SpreadSheet.Data.TickAppearance.Line ax3d2.MajorGridlinesStroke = New SolidColorBrush(System.Windows.Media.Colors.Purple) 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.AxisX = ax3d schart.AxisY = ax3d1 schart.AxisZ = ax3d2 schart.ColorPalette = colors schart.DataSeries.Add(ds1) schart.DataSeries.Add(ds2) schart.DataSeries.Add(ds3) Me.GcSpreadSheet1.ActiveSheet.SurfaceCharts.Add(schart)
Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6