Interface IChartSeriesAxis
Represents the chart series Axis.
Inherited Members
Namespace: Syncfusion.XlsIO
Assembly: Syncfusion.XlsIO.Base.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 |
---|
System.Int32 |
TickLabelSpacing
Represents the number of categories or series between tick-mark labels.
Declaration
int TickLabelSpacing { get; set; }
Property Value
Type |
---|
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 |
---|
System.Int32 |
TickMarkSpacing
Represents the number of categories or series between tick marks.
Declaration
int TickMarkSpacing { get; set; }
Property Value
Type |
---|
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();
}