Class XlsChartCategoryAxis
- Namespace
- Spire.Xls.Core.Spreadsheet.Charts
- Assembly
- Spire.XLS.dll
public class XlsChartCategoryAxis : XlsChartAxis, IExcelApplication, IDisposable, IChartCategoryAxis, IChartValueAxis, IChartAxis
- Inheritance
-
XlsChartCategoryAxis
- Implements
- Derived
- Inherited Members
Fields
DefaultCategoryAxisId
public const int DefaultCategoryAxisId = 59983360
Field Value
DefaultSecondaryCategoryAxisId
public const int DefaultSecondaryCategoryAxisId = 62908672
Field Value
Properties
AxisBetweenCategories
True if the value axis crosses the category axis between categories
public bool AxisBetweenCategories { get; set; }
Property Value
BaseUnit
Represents base unit for the specified category axis.
public ChartBaseUnitType BaseUnit { get; set; }
Property Value
BaseUnitIsAuto
True if use automatic base units for the specified category axis.
public bool BaseUnitIsAuto { get; set; }
Property Value
BinWidth
Get or Set the number of data points in each range.
public double BinWidth { get; set; }
Property Value
Remarks
Applies only to Histogram and Pareto charts.
CategoryLabels
Category labels for the chart.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chart and set rangeIChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["A1:C2"];//Set chart category axisIChartCategoryAxis categoryAxis = chart.PrimaryCategoryAxis;//Get category label range . Output will be A1:C1Console.WriteLine(categoryAxis.CategoryLabels.RangeAddressLocal);//Save to fileworkbook.SaveToFile("Chart.xlsx");
public IXLSRange CategoryLabels { get; set; }
Property Value
CategoryType
Represents axis category type.
public CategoryType CategoryType { get; set; }
Property Value
CrossValue
Value of category axis crosses.
public double CrossValue { get; set; }
Property Value
CrossesAt
Represents the point on the axis another axis crosses it.
public double CrossesAt { get; set; }
Property Value
CrossingPoint
Represents the point on the axis another axis crosses it.
public double CrossingPoint { get; set; }
Property Value
EnteredDirectlyCategoryLabels
Entered directly category labels for the chart.
public object[] EnteredDirectlyCategoryLabels { get; set; }
Property Value
- object[]
HasAutomaticBins
True if bins generated are automatic. otherwise False
public bool HasAutomaticBins { get; set; }
Property Value
Remarks
Applies only to Histogram and Pareto charts.
IsAutoCross
Automatic category crossing point selected.
public bool IsAutoCross { get; }
Property Value
IsAutoMajor
Automatic major selected.
public bool IsAutoMajor { get; set; }
Property Value
IsAutoMax
Automatic maximum selected.
public bool IsAutoMax { get; set; }
Property Value
IsAutoMin
Automatic minimum selected.
public bool IsAutoMin { get; set; }
Property Value
IsAutoMinor
Automatic minor selected.
public bool IsAutoMinor { get; set; }
Property Value
IsBinningByCategory
True if bins generated by category values. otherwise False
public bool IsBinningByCategory { get; set; }
Property Value
Remarks
Applies only to Histogram and Pareto charts.
IsLogScale
Logarithmic scale.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["A1:C2"];//Set chart value axisIChartValueAxis valueAxis = chart.PrimaryValueAxis;//Set IsLogScalevalueAxis.IsLogScale = true;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool IsLogScale { get; set; }
Property Value
IsMaxCross
Value axis crosses at the far right category.
public bool IsMaxCross { get; set; }
Property Value
IsReverseOrder
Categories in reverse order.
public bool IsReverseOrder { get; set; }
Property Value
LabelFrequency
Frequency of labels.
public int LabelFrequency { get; set; }
Property Value
LogBase
public double LogBase { get; set; }
Property Value
MajorUnit
Value of major increment.
public double MajorUnit { get; set; }
Property Value
MajorUnitScale
Represens the major unit scale value for the category axis when the CategoryType property is set to TimeScale.
public ChartBaseUnitType MajorUnitScale { get; set; }
Property Value
MaxValue
Maximum value on axis.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["A1:C2"];//Set chart value axisIChartValueAxis valueAxis = chart.PrimaryValueAxis;//Set min and max valuevalueAxis.MinValue = -20;valueAxis.MaxValue = 60;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public double MaxValue { get; set; }
Property Value
MinValue
Maximum value on axis.
//Create worksheetWorkbook workbook = new Workbook();workbook.LoadFromFile("Sample.xlsx");Worksheet worksheet = workbook.Worksheets[0];//Create chartChart chart = worksheet.Charts.Add();chart.DataRange = worksheet.Range["A1:C2"];//Set chart value axisIChartValueAxis valueAxis = chart.PrimaryValueAxis;//Set min and max valuevalueAxis.MinValue = -20;valueAxis.MaxValue = 60;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public double MinValue { get; set; }
Property Value
MinorUnit
Value of minor increment.
public double MinorUnit { get; set; }
Property Value
MinorUnitScale
Represens the minor unit scale value for the category axis when the CategoryType property is set to TimeScale.
public ChartBaseUnitType MinorUnitScale { get; set; }
Property Value
NumberOfBins
Get or set the Number of Bins in the axis
public int NumberOfBins { get; set; }
Property Value
Remarks
Applies only to Histogram and Pareto charts.Can be a value from 1 through 31999.
Offset
Represents distance between the labels and axis line. The value can be from 0 through 1000.
public int Offset { get; set; }
Property Value
OverflowBinValue
Get or Set the OverFlow Bin value
public double OverflowBinValue { get; set; }
Property Value
Remarks
Applies only to Histogram and Pareto charts.
TickLabelSpacing
Represents the number of categories or series between tick-mark labels.
public int TickLabelSpacing { get; set; }
Property Value
TickMarkSpacing
Represents the number of categories or series between tick marks.
public int TickMarkSpacing { get; set; }
Property Value
TickMarksFrequency
Frequency of tick marks.
public int TickMarksFrequency { get; set; }
Property Value
UnderflowBinValue
Get or Set the UnderFlow Bin value
public double UnderflowBinValue { get; set; }
Property Value
Remarks
Applies only to Histogram and Pareto charts.
Methods
Clone(object, Dictionary<int, int>, Dictionary<string, string>)
[Obsolete("the method is not implemented")]
public override XlsChartAxis Clone(object parent, Dictionary<int, int> dicFontIndexes, Dictionary<string, string> dicNewSheetNames)
Parameters
parent
objectdicFontIndexes
Dictionary<int, int>dicNewSheetNames
Dictionary<string, string>