Table of Contents

Interface IChartSeriesAxis

Namespace
Spire.Xls.Core
Assembly
Spire.XLS.dll

Represents the chart series Axis.

public interface IChartSeriesAxis : IChartAxis
Inherited Members

Properties

LabelsFrequency

Frequency of labels. The following code illustrates how to set LabelsFrequency for IChartSeriesAxis:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Create chart
IChart chart = worksheet.Charts.Add();

//Set range
chart.DataRange = worksheet.Range["A1:C3"];

//Set chart type
chart.ChartType = ExcelChartType.Column3D;

//Set LabelsFrequency
chart.PrimarySerieAxis.LabelsFrequency = 2;

//Save to file
workbook.SaveToFile("Chart.xlsx");
int LabelsFrequency { get; set; }

Property Value

int

TickLabelSpacing

Represents the number of categories or series between tick-mark labels. The following code illustrates how to set TickLabelSpacing for IChartSeriesAxis:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Create chart
IChart chart = worksheet.Charts.Add();

//Set range
chart.DataRange = worksheet.Range["A1:C3"];

//Set chart type
chart.ChartType = ExcelChartType.Column3D;

//Set tick label spacing
chart.PrimarySerieAxis.TickLabelSpacing = 2;

//Save to file
workbook.SaveToFile("Chart.xlsx");
int TickLabelSpacing { get; set; }

Property Value

int

TickMarksFrequency

Frequency of tick marks. The following code illustrates how to set TickMarksFrequency for IChartSeriesAxis:

//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];

//Create chart
IChart chart = worksheet.Charts.Add();

//Set range
chart.DataRange = worksheet.Range["A1:C3"];

//Set chart type
chart.ChartType = ExcelChartType.Column3D;

//Set tick mark frequency
chart.PrimarySerieAxis.TickMarksFrequency = 2;

//Save to file
workbook.SaveToFile("Chart.xlsx");
int TickMarksFrequency { get; set; }

Property Value

int