.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

AxisScaling.LogBase Property

Gets or sets a value specifying a logarithmic base for the logarithmic axis.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v20.2.Core.dll


double LogBase { get; set; }
Property LogBase As Double

Property Value

Type Description

A Double value that is the logarithmic base. This value must be greater than or equal to two.


If the AxisScaling.LogScale property is set to true, use the LogBase property to specify the logarithmic base.

With the LogBase property, you can define a base value as a logarithm that will be used to calculate the axis values.

The images in the table below demonstrate how the LogBase property works.

LogBase = 10 LogBase = 20
SpreadsheetChart_LocarithmicChartBase10 SpreadsheetChart_LocarithmicChartBase20


The example below demonstrates how to create a simple line chart and change the value axis to logarithmic using the AxisScaling.LogScale property. The logarithmic base, defined by the AxisScaling.LogBase property, is set to 10.

Dim worksheet As Worksheet = workbook.Worksheets("chartTask5")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.Line, worksheet("B2:D8"))
chart.TopLeftCell = worksheet.Cells("F2")
chart.BottomRightCell = worksheet.Cells("L15")

' Set the logarithmic(Log10) type of scale.
chart.PrimaryAxes(1).Scaling.LogScale = True
chart.PrimaryAxes(1).Scaling.LogBase = 10

' Set the position of the legend on the chart.
chart.Legend.Position = LegendPosition.Bottom
See Also