Table of Contents

Class XlsChartValueAxis

Namespace
Spire.Xls.Core.Spreadsheet.Charts
Assembly
Spire.XLS.dll
public class XlsChartValueAxis : XlsChartAxis, IExcelApplication, IDisposable, IChartValueAxis, IChartAxis
Inheritance
XlsChartValueAxis
Implements
Derived
Inherited Members

Properties

CrossValue

Value of category axis crosses.

public double CrossValue { get; set; }

Property Value

double

CrossesAt

Represents the point on the axis another axis crosses it.

public double CrossesAt { get; set; }

Property Value

double

DisplayUnit

Returns or sets the unit label for the specified axis.

public ChartDisplayUnitType DisplayUnit { get; set; }

Property Value

ChartDisplayUnitType

DisplayUnitCustom

Represents custom unit to display.

public double DisplayUnitCustom { get; set; }

Property Value

double

HasDisplayUnitLabel

True if the label is displayed on the specified axis.

public bool HasDisplayUnitLabel { get; set; }

Property Value

bool

IsAutoCross

Automatic category crossing point selected.

public bool IsAutoCross { get; }

Property Value

bool

IsAutoMajor

Automatic major selected.

public bool IsAutoMajor { get; set; }

Property Value

bool

IsAutoMax

Automatic maximum selected. The following code illustrates how to access IsAutoMax:

//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;//Check IsAutoMaxConsole.WriteLine(valueAxis.IsAutoMax);//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool IsAutoMax { get; set; }

Property Value

bool

IsAutoMin

Automatic minimum selected. The following code illustrates how to access IsAutoMin:

//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;//Check IsAutoMinConsole.WriteLine(valueAxis.IsAutoMin);//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool IsAutoMin { get; set; }

Property Value

bool

IsAutoMinor

Automatic minor selected.

public bool IsAutoMinor { get; set; }

Property Value

bool

IsLogScale

Logarithmic scale.

public bool IsLogScale { get; set; }

Property Value

bool

IsMaxCross

Category axis to cross at maximum value. The following code illustrates how to access IsMaxCross:

//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;//Get IsMaxCrossConsole.WriteLine(valueAxis.IsMaxCross);//Save to fileworkbook.SaveToFile("Chart.xlsx");
public bool IsMaxCross { get; }

Property Value

bool

IsReverseOrder

Values in reverse order.

public bool IsReverseOrder { get; set; }

Property Value

bool

LogBase

Represents the logarithmic base.

public double LogBase { get; set; }

Property Value

double

MajorUnit

Value of major increment. The following code illustrates how to set major axis increment unit for charts:

//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 major unitvalueAxis.MajorUnit = 20;//Save to fileworkbook.SaveToFile("Chart.xlsx");
public double MajorUnit { get; set; }

Property Value

double

MaxValue

Maximum value on axis. The following code illustrates how to set MinValue and MaxValue for charts:

//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

double

MinValue

Minimum value on axis.

public double MinValue { get; set; }

Property Value

double

MinorUnit

Value of minor increment.

public double MinorUnit { get; set; }

Property Value

double

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 object
dicFontIndexes Dictionary<int, int>
dicNewSheetNames Dictionary<string, string>

Returns

XlsChartAxis