AxisScaling Interface
Contains axis scaling options.
Namespace: DevExpress.Spreadsheet.Charts
Assembly: DevExpress.Spreadsheet.v18.2.Core.dll
Declaration
Related API Members
The following members return AxisScaling objects:
Remarks
To access an object exposing the AxisScaling interface, use the Axis.Scaling property. Utilize it’s members to control the minimum (AxisScaling.AutoMin or AxisScaling.Min) and maximum (AxisScaling.AutoMax or AxisScaling.Max) values of the axis, change the numerical axis to logarithmic (AxisScaling.LogScale and AxisScaling.LogBase) and specify the axis orientation (AxisScaling.Orientation).
Example
The example below demonstrates how to create a clustered column chart and specify the value axis scale. Set the AxisScaling.AutoMax and AxisScaling.AutoMin properties to false to indicate that maximum and minimum values of the axis will be set manually by using the AxisScaling.Max and AxisScaling.Min properties
Note
A complete sample project is available at https://github.com/DevExpress-Examples/winforms-spreadsheet-chart-api-e5222
Dim worksheet As Worksheet = workbook.Worksheets("chartTask3")
workbook.Worksheets.ActiveWorksheet = worksheet
' Create a chart and specify its location.
Dim chart As Chart = worksheet.Charts.Add(ChartType.ColumnClustered, worksheet("B3:C5"))
chart.TopLeftCell = worksheet.Cells("H2")
chart.BottomRightCell = worksheet.Cells("N14")
' Set the minimum and maximum values for the chart value axis.
Dim axis As Axis = chart.PrimaryAxes(1)
axis.Scaling.AutoMax = False
axis.Scaling.Max = 1
axis.Scaling.AutoMin = False
axis.Scaling.Min = 0
' Hide the legend.
chart.Legend.Visible = False