Axis Class |
Namespace: Aspose.Cells.Charts
The Axis type exposes the following members.
Name | Description | |
---|---|---|
![]() | Area |
Gets the Area.
|
![]() | AxisBetweenCategories |
Represents if the value axis crosses the category axis between categories.
|
![]() | AxisLabels |
Gets the labels of the axis after call Chart.Calculate() method.
|
![]() | AxisLine |
Gets the appearance of an Axis.
|
![]() | BaseUnitScale |
Represents the base unit scale for the category axis.
|
![]() | Bins |
Represents bins on a chart(Histogram/Pareto) axis
|
![]() | CategoryType |
Represents the category axis type.
|
![]() | CrossAt |
Represents the point on the value axis where the category axis crosses it.
|
![]() | CrossType |
Represents the CrossType on the specified axis where the other axis crosses.
|
![]() | CustUnit |
Specifies a custom value for the display unit.
|
![]() | DisplayUnit |
Represents the unit label for the specified axis.
|
![]() | DisplayUnitLabel |
Represents a unit label on an axis in the specified chart.
Unit labels are useful for charting large values— for example, in the millions or billions.
|
![]() | HasMultiLevelLabels |
Indicates whether the labels shall be shown as multi level.
|
![]() | IsAutomaticMajorUnit |
Indicates whether the major unit of the axis is automatically assigned.
|
![]() | IsAutomaticMaxValue |
Indicates whether the max value is automatically assigned.
|
![]() | IsAutomaticMinorUnit |
Indicates whether the minor unit of the axis is automatically assigned.
|
![]() | IsAutomaticMinValue |
Indicates whether the min value is automatically assigned.
|
![]() | IsAutoTickLabelSpacing |
Indicates whether the spacing of tick label is automatic
|
![]() | IsDisplayUnitLabelShown |
Represents if the display unit label is shown on the specified axis.
|
![]() | IsLogarithmic |
Represents if the value axis scale type is logarithmic or not.
|
![]() | IsPlotOrderReversed |
Represents if Microsoft Excel plots data points from last to first.
|
![]() | IsVisible |
Represents if the axis is visible.
|
![]() | LogBase |
Represents the logarithmic base. Default value is 10.Only applies for Excel2007.
|
![]() ![]() | MajorGridLines |
Represents major gridlines on a chart axis.
|
![]() | MajorTickMark |
Represents the type of major tick mark for the specified axis.
|
![]() | MajorUnit |
Represents the major units for the axis.
|
![]() ![]() | MajorUnitScale |
Represents the major unit scale for the category axis.
|
![]() | MaxValue |
Represents the maximum value on the value axis.
|
![]() | MinorGridLines |
Represents minor gridlines on a chart axis.
|
![]() | MinorTickMark |
Represents the type of minor tick mark for the specified axis.
|
![]() | MinorUnit |
Represents the minor units for the axis.
|
![]() ![]() | MinorUnitScale |
Represents the major unit scale for the category axis.
|
![]() | MinValue |
Represents the minimum value on the value axis.
|
![]() | TickLabelPosition |
Represents the position of tick-mark labels on the specified axis.
|
![]() | TickLabels |
Returns a TickLabels object that represents the tick-mark labels for the specified axis.
|
![]() | TickLabelSpacing |
Represents the number of categories or series between tick-mark labels. Applies only to category and series axes.
|
![]() | TickMarkSpacing |
Returns or sets the number of categories or series between tick marks. Applies only to category and series axes.
|
![]() | Title |
Gets the axis' title.
|
Name | Description | |
---|---|---|
![]() | Equals | (Inherited from Object.) |
![]() | Finalize | (Inherited from Object.) |
![]() | GetHashCode | (Inherited from Object.) |
![]() | GetType | (Inherited from Object.) |
![]() | MemberwiseClone | (Inherited from Object.) |
![]() | ToString | (Inherited from Object.) |
[C#] //Instantiating a Workbook object Workbook workbook = new Workbook(); //Adding a new worksheet to the Excel object int sheetIndex = workbook.Worksheets.Add(); //Obtaining the reference of the newly added worksheet by passing its sheet index Worksheet worksheet = workbook.Worksheets[sheetIndex]; //Adding a sample value to "A1" cell worksheet.Cells["A1"].PutValue(50); //Adding a sample value to "A2" cell worksheet.Cells["A2"].PutValue(100); //Adding a sample value to "A3" cell worksheet.Cells["A3"].PutValue(150); //Adding a sample value to "B1" cell worksheet.Cells["B1"].PutValue(4); //Adding a sample value to "B2" cell worksheet.Cells["B2"].PutValue(20); //Adding a sample value to "B3" cell worksheet.Cells["B3"].PutValue(50); //Adding a chart to the worksheet int chartIndex = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 5); //Accessing the instance of the newly added chart Chart chart = worksheet.Charts[chartIndex]; //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", true); //Set the max value of value axis chart.ValueAxis.MaxValue = 200; //Set the min value of value axis chart.ValueAxis.MinValue = 0; //Set the major unit chart.ValueAxis.MajorUnit = 25; //Category(X) axis crosses at the maxinum value. chart.ValueAxis.CrossType = CrossType.Maximum; //Set he number of categories or series between tick-mark labels. chart.CategoryAxis.TickLabelSpacing = 2; //do your business //Saving the Excel file workbook.Save("book1.xlsx"); [Visual Basic] 'Instantiating a Workbook object Dim workbook As Workbook = New Workbook() 'Adding a new worksheet to the Excel object Dim sheetIndex As Int32 = workbook.Worksheets.Add() 'Obtaining the reference of the newly added worksheet by passing its sheet index Dim worksheet As Worksheet = workbook.Worksheets(sheetIndex) 'Adding a sample value to "A1" cell worksheet.Cells("A1").PutValue(50) 'Adding a sample value to "A2" cell worksheet.Cells("A2").PutValue(100) 'Adding a sample value to "A3" cell worksheet.Cells("A3").PutValue(150) 'Adding a sample value to "B1" cell worksheet.Cells("B1").PutValue(4) 'Adding a sample value to "B2" cell worksheet.Cells("B2").PutValue(20) 'Adding a sample value to "B3" cell worksheet.Cells("B3").PutValue(50) 'Adding a chart to the worksheet Dim chartIndex As Int32 = worksheet.Charts.Add(ChartType.Column, 5, 0, 25, 5) 'Accessing the instance of the newly added chart Dim chart As Chart = worksheet.Charts(chartIndex) 'Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3" chart.NSeries.Add("A1:B3", True) 'Set the max value of value axis chart.ValueAxis.MaxValue = 200 'Set the min value of value axis chart.ValueAxis.MinValue = 0 'Set the major unit chart.ValueAxis.MajorUnit = 25 'Category(X) axis crosses at the maxinum value. chart.ValueAxis.CrossType = CrossType.Maximum 'Set he number of categories or series between tick-mark labels. chart.CategoryAxis.TickLabelSpacing = 2 'Saving the Excel file workbook.Save("book1.xlsx")