Spread WinRT Documentation
GrapeCity.Xaml.SpreadSheet.Data Namespace / AxisType Enumeration
Example Example


In This Topic
    AxisType Enumeration
    In This Topic
    Specifies the axis type.
    Syntax
    'Declaration
     
    Public Enum AxisType 
       Inherits System.Enum
    'Usage
     
    Dim instance As AxisType
    public enum AxisType : System.Enum 
    Members
    MemberDescription
    CategorySpecifies that the axis is a category axis
    DateSpecifies that the axis is a date axis
    ValueSpecifies that the axis is a value axis
    Example
    This example uses the AxisType enumeration.
    using C1.Xaml.Chart;
    
    GrapeCity.Xaml.SpreadSheet.Data.SpreadOpenHighLowCloseSeries ds = new GrapeCity.Xaml.SpreadSheet.Data.SpreadOpenHighLowCloseSeries();
    ds.StrokeThickness = 3;
    ds.XValues.AddRange(new double[] { 
    new DateTime(2008,10,1).C1.Xaml.Chart.ToOADate(), new DateTime(2008,10,2).ToOADate(), new DateTime(2008,10,3).ToOADate(),
    new DateTime(2008,10,6).ToOADate(), new DateTime(2008,10,7).ToOADate(), new DateTime(2008,10,8).ToOADate()
              });
    ds.OpenSeries.Values.AddRange(new double[] { 100, 102, 104, 100, 107, 102 });
    ds.CloseSeries.Values.AddRange(new double[] { 102, 104, 100, 107, 102, 100 });
    ds.HighSeries.Values.AddRange(new double[] { 102, 105, 105, 108, 109, 105 });
    ds.LowSeries.Values.AddRange(new double[] { 99, 95, 95, 100, 96, 99, 98 });
    GrapeCity.Xaml.SpreadSheet.Data.SpreadChart chart = new GrapeCity.Xaml.SpreadSheet.Data.SpreadChart();
    chart.DataSeries.Add(ds);
    chart.ChartType = GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.StockHighLowOpenClose;
    chart.Name = "name1";
    chart.AxisX.AxisType = GrapeCity.Xaml.SpreadSheet.Data.AxisType.Date;
    chart.AxisX.BaseTimeUnit = GrapeCity.Xaml.SpreadSheet.Data.AxisTimeUnit.Days;
    this.gcSpreadSheet1.ActiveSheet.Charts.Add(chart);
    Imports C1.Xaml.Chart
    
    Dim ds As New GrapeCity.Xaml.SpreadSheet.Data.SpreadOpenHighLowCloseSeries()
    ds.StrokeThickness = 3
    ds.XValues.AddRange(New Double() {
    New DateTime(2008, 10, 1).ToOADate(), New DateTime(2008, 10, 2).ToOADate(), New DateTime(2008, 10, 3).ToOADate(),
    New DateTime(2008, 10, 6).ToOADate(), New DateTime(2008, 10, 7).ToOADate(), New DateTime(2008, 10, 8).ToOADate()
          })
    ds.OpenSeries.Values.AddRange(New Double() {100, 102, 104, 100, 107, 102})
    ds.CloseSeries.Values.AddRange(New Double() {102, 104, 100, 107, 102, 100})
    ds.HighSeries.Values.AddRange(New Double() {102, 105, 105, 108, 109, 105})
    ds.LowSeries.Values.AddRange(New Double() {99, 95, 95, 100, 96, 99, 98})
    Dim chart As New GrapeCity.Xaml.SpreadSheet.Data.SpreadChart()
    chart.DataSeries.Add(ds)
    chart.ChartType = GrapeCity.Xaml.SpreadSheet.Data.SpreadChartType.StockHighLowOpenClose
    chart.Name = "name1"
    chart.AxisX.AxisType = GrapeCity.Xaml.SpreadSheet.Data.AxisType.Date
    chart.AxisX.BaseTimeUnit = GrapeCity.Xaml.SpreadSheet.Data.AxisTimeUnit.Days
    GcSpreadSheet1.ActiveSheet.Charts.Add(chart)
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             GrapeCity.Xaml.SpreadSheet.Data.AxisType

    See Also