IChartCategoryAxis module
- class IChartCategoryAxis.IChartCategoryAxis
Bases:
IChartValueAxis,IChartAxis- <summary>
Represents category axis of the chart.
</summary>
- abstract property AxisBetweenCategories: bool
- <summary>
- If true - cuts unused plot area. Default for area, surface charts.
<example>The following code illustrates how to set AxisBetweenCategories to “false” so that chart serie would be plotted on the tick marks: <code>
//Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Create chart and set range IChart chart = worksheet.Charts.Add(); chart.DataRange = worksheet.Range[“A1:C2”]; //Set chart category axis IChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis; //Set category axis IsBetween categoryAxis.AxisBetweenCategories = false; //Save to file workbook.SaveToFile(“Chart.xlsx”); </code> </example>
</summary>
- abstract property BaseUnit: ChartBaseUnitType
- <summary>
- Represents base unit for the specified category axis.
<example>The following code illustrates how to set BaseUnit for IChartCategoryAxis: <code>
//Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Create chart and set range IChart chart = worksheet.Charts.Add(); chart.DataRange = worksheet.Range[“A1:C2”]; //Set chart category axis IChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis; //Set category type categoryAxis.CategoryType = CategoryType.Time; //Set base unit categoryAxis.BaseUnit = ChartBaseUnitType.Year; //Save to file workbook.SaveToFile(“Chart.xlsx”); </code> </example>
</summary>
- abstract property BaseUnitIsAuto: bool
- <summary>
True if use automatic base units for the specified category axis.
</summary>
- abstract property CategoryLabels: IXLSRange
- <summary>
- Category labels for the chart.
<example>The following code illustrates how to access the category labels range: <code>
//Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Create chart and set range IChart chart = worksheet.Charts.Add(); chart.DataRange = worksheet.Range[“A1:C2”]; //Set chart category axis IChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis; //Get category label range . Output will be A1:C1 Console.WriteLine(categoryAxis.CategoryLabels.RangeAddressLocal); //Save to file workbook.SaveToFile(“Chart.xlsx”); </code> </example>
</summary>
- abstract property CategoryType: CategoryType
- <summary>
- Represents axis category type.
<example>The following code illustrates how to set CategoryType.Time to CategoryType: <code>
//Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Create chart and set range IChart chart = worksheet.Charts.Add(); chart.DataRange = worksheet.Range[“A1:C2”]; //Set chart category axis IChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis; //Set category type categoryAxis.CategoryType = CategoryType.Time; //Set base unit categoryAxis.BaseUnit = ChartBaseUnitType.Year; //Save to file workbook.SaveToFile(“Chart.xlsx”); </code> </example>
</summary>
- abstract property CrossingPoint: float
- <summary>
Value axis / category crossing point (2D charts only).
</summary>
- abstract property EnteredDirectlyCategoryLabels: List[SpireObject]
- <summary>
Entered directly category labels for the chart.
</summary>
- abstract property LabelFrequency: int
- <summary>
Frequency of labels.
</summary>
- abstract property MajorUnitScale: ChartBaseUnitType
- <summary>
- Represens the major unit scale value for the category axis
when the CategoryType property is set to TimeScale.
</summary>
- abstract property MinorUnitScale: ChartBaseUnitType
- <summary>
- Represens the minor unit scale value for the category axis
when the CategoryType property is set to TimeScale.
</summary>
- abstract property Offset: int
- <summary>
- Represents distance between the labels and axis line.
The value can be from 0 through 1000.
</summary>
- abstract property TickLabelSpacing: int
- <summary>
- Represents the number of categories or series between tick-mark labels.
<example>The following code illustrates how to set TickLabelSpacing for chart axis: <code>
//Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Create chart and set range IChart chart = worksheet.Charts.Add(); chart.DataRange = worksheet.Range[“A1:F2”]; //Set chart category axis IChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis; //Set tick label spacing categoryAxis.TickLabelSpacing = 2; //Save to file workbook.SaveToFile(“Chart.xlsx”); </code> </example>
</summary>
- abstract property TickMarkSpacing: int
- <summary>
- Represents the number of categories or series between tick marks.
<example>The following code illustrates how to set TickMarkSpacing for chart axis: <code>
//Create worksheet Workbook workbook = new Workbook(); workbook.LoadFromFile(“Sample.xlsx”); Worksheet worksheet = workbook.Worksheets[0]; //Create chart and set range IChart chart = worksheet.Charts.Add(); chart.DataRange = worksheet.Range[“A1:F2”]; //Set chart category axis IChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis; //Set tick mark spacing categoryAxis.TickMarkSpacing = 2; //Save to file workbook.SaveToFile(“Chart.xlsx”); </code> </example>
</summary>
- abstract property TickMarksFrequency: int
- <summary>
Frequency of tick marks.
</summary>