Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface IChartSeriesAxis

    Show / Hide Table of Contents

    Interface IChartSeriesAxis

    Represents the chart series Axis.

    Inherited Members
    IChartAxis.NumberFormat
    IChartAxis.AxisType
    IChartAxis.Title
    IChartAxis.TextRotationAngle
    IChartAxis.TitleArea
    IChartAxis.Font
    IChartAxis.MajorGridLines
    IChartAxis.MinorGridLines
    IChartAxis.HasMinorGridLines
    IChartAxis.HasMajorGridLines
    IChartAxis.MinorTickMark
    IChartAxis.MajorTickMark
    IChartAxis.Border
    IChartAxis.AutoTickLabelSpacing
    IChartAxis.TickLabelPosition
    IChartAxis.Visible
    IChartAxis.Alignment
    IChartAxis.IsReversed
    IChartAxis.ReversePlotOrder
    IChartAxis.Shadow
    IChartAxis.Chart3DOptions
    Namespace: Syncfusion.XlsIO
    Assembly: Syncfusion.XlsIO.Portable.dll
    Syntax
    public interface IChartSeriesAxis : IChartAxis

    Properties

    LabelFrequency

    Represents the number of categories or series between tick-mark labels.[Deprecated]

    Declaration
    int LabelFrequency { get; set; }
    Property Value
    Type Description
    System.Int32

    TickLabelSpacing

    Represents the number of categories or series between tick-mark labels.

    Declaration
    int TickLabelSpacing { get; set; }
    Property Value
    Type Description
    System.Int32
    Examples

    The following code illustrates how to set TickLabelSpacing for IChartSeriesAxis.

            using (ExcelEngine excelEngine = new ExcelEngine())
            {
                //Create worksheet
                IApplication application = excelEngine.Excel;
                application.DefaultVersion = ExcelVersion.Excel2013;
                IWorkbook workbook = application.Workbooks.Create(1);
                IWorksheet sheet = workbook.Worksheets[0];
    
                //Add data
                sheet.Range["A1"].Text = "Jan";
                sheet.Range["B1"].Text = "Feb";
                sheet.Range["C1"].Text = "Mar";
                sheet.Range["A2"].Value = "10";
                sheet.Range["B2"].Value = "20";
                sheet.Range["C2"].Value = "30";
                sheet.Range["A3"].Value = "15";
                sheet.Range["B3"].Value = "25";
                sheet.Range["C3"].Value = "35";
    
                //Create chart
                IChart chart = sheet.Charts.Add();
    
                //Set range
                chart.DataRange = sheet.Range["A1:C3"];
    
                //Set chart type
                chart.ChartType = ExcelChartType.Column_3D;
    
                //Set tick label spacing 
                chart.PrimarySerieAxis.TickLabelSpacing = 2;
    
                //Save and Dispose
                workbook.SaveAs("Chart.xlsx");
                workbook.Close();
            }

    TickMarksFrequency

    Represents the number of categories or series between tick marks.[Deprecated]

    Declaration
    int TickMarksFrequency { get; set; }
    Property Value
    Type Description
    System.Int32

    TickMarkSpacing

    Represents the number of categories or series between tick marks.

    Declaration
    int TickMarkSpacing { get; set; }
    Property Value
    Type Description
    System.Int32
    Examples

    The following code illustrates how to set TickMarkSpacing for IChartSeriesAxis.

            using (ExcelEngine excelEngine = new ExcelEngine())
            {
                //Create worksheet
                IApplication application = excelEngine.Excel;
                application.DefaultVersion = ExcelVersion.Excel2013;
                IWorkbook workbook = application.Workbooks.Create(1);
                IWorksheet sheet = workbook.Worksheets[0];
    
                //Add data
                sheet.Range["A1"].Text = "Jan";
                sheet.Range["B1"].Text = "Feb";
                sheet.Range["C1"].Text = "Mar";
                sheet.Range["A2"].Value = "10";
                sheet.Range["B2"].Value = "20";
                sheet.Range["C2"].Value = "30";
                sheet.Range["A3"].Value = "15";
                sheet.Range["B3"].Value = "25";
                sheet.Range["C3"].Value = "35";
    
                //Create chart
                IChart chart = sheet.Charts.Add();
    
                //Set range
                chart.DataRange = sheet.Range["A1:C3"];
    
                //Set chart type
                chart.ChartType = ExcelChartType.Column_3D;
    
                //Set tick mark spacing 
                chart.PrimarySerieAxis.TickMarkSpacing = 2;
    
                //Save and Dispose
                workbook.SaveAs("Chart.xlsx");
                workbook.Close();
            }
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved