Spread WPF 15
GrapeCity.Windows.SpreadSheet.Data Namespace / Axis3D Class / MajorUnit Property
Example


In This Topic
    MajorUnit Property (Axis3D)
    In This Topic
    Gets or sets the major unit (distance between labels).
    Syntax
    'Declaration
     
    Public Property MajorUnit As Double
    'Usage
     
    Dim instance As Axis3D
    Dim value As Double
     
    instance.MajorUnit = value
     
    value = instance.MajorUnit
    public double MajorUnit {get; set;}
    Example
    This example sets the MajorUnit property.
    GrapeCity.Windows.SpreadSheet.Data.ChartTitle clabel = new GrapeCity.Windows.SpreadSheet.Data.ChartTitle();
    clabel.Text = "Label";
    
    GrapeCity.Windows.SpreadSheet.Data.Axis3D ax3d = new GrapeCity.Windows.SpreadSheet.Data.Axis3D();
    ax3d.MajorGridlinesStrokeThemeColor = "Accent 6 40";
    ax3d.MajorTickHeight = 5;
    ax3d.MajorUnit = 2;
    ax3d.Max = 10;
    ax3d.Min = 1;
    ax3d.Reversed = true;
    ax3d.Title = clabel;
          
    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.DataSeries.Add(ds1);
    schart.DataSeries.Add(ds2);
    schart.DataSeries.Add(ds3);
    GcSpreadSheet1.ActiveSheet.SurfaceCharts.Add(schart);
    Dim clabel As New GrapeCity.Windows.SpreadSheet.Data.ChartTitle()
    clabel.Text = "Label"
    
    Dim ax3d As New GrapeCity.Windows.SpreadSheet.Data.Axis3D()
    ax3d.MajorGridlinesStrokeThemeColor = "Accent 6 40"
    ax3d.MajorTickHeight = 5
    ax3d.MajorUnit = 2
    ax3d.Max = 10
    ax3d.Min = 1
    ax3d.Reversed = True
    ax3d.Title = clabel
          
    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.DataSeries.Add(ds1)
    schart.DataSeries.Add(ds2)
    schart.DataSeries.Add(ds3)
    Me.GcSpreadSheet1.ActiveSheet.SurfaceCharts.Add(schart)
    See Also