Back to Devexpress

SparklineGroup.VerticalAxis Property

officefileapi-devexpress-dot-spreadsheet-dot-sparklinegroup-8b62f8f4.md

latest4.5 KB
Original Source

SparklineGroup.VerticalAxis Property

Provides access to the settings for the vertical axis of the sparkline group.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
SparklineVerticalAxis VerticalAxis { get; }
vb
ReadOnly Property VerticalAxis As SparklineVerticalAxis

Property Value

TypeDescription
SparklineVerticalAxis

A SparklineVerticalAxis object containing vertical axis options.

|

Remarks

Use the VerticalAxis property to specify scaling options for the vertical axis of the existing sparkline group, as shown in the example below.

View Example

csharp
Worksheet worksheet = workbook.Worksheets["SparklineExamples"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Create a group of column sparklines.
SparklineGroup columnGroup = worksheet.SparklineGroups.Add(worksheet["G4:G7"], worksheet["C4:F4,C5:F5,C6:F6, C7:F7"], SparklineGroupType.Column);

// Specify the vertical axis options.
SparklineVerticalAxis verticalAxis = columnGroup.VerticalAxis;
// Set the custom minimum value for the vertical axis.
verticalAxis.MinScaleType = SparklineAxisScaling.Custom;
verticalAxis.MinCustomValue = 0;
// Set the custom maximum value for the vertical axis.
verticalAxis.MaxScaleType = SparklineAxisScaling.Custom;
verticalAxis.MaxCustomValue = 12000;
vb
Dim worksheet As Worksheet = workbook.Worksheets("SparklineExamples")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a group of column sparklines.
Dim columnGroup As SparklineGroup = worksheet.SparklineGroups.Add(worksheet("G4:G7"), worksheet("C4:F4,C5:F5,C6:F6, C7:F7"), SparklineGroupType.Column)

' Specify the vertical axis options.
Dim verticalAxis As SparklineVerticalAxis = columnGroup.VerticalAxis
' Set the custom minimum value for the vertical axis.
verticalAxis.MinScaleType = SparklineAxisScaling.Custom
verticalAxis.MinCustomValue = 0
' Set the custom maximum value for the vertical axis.
verticalAxis.MaxScaleType = SparklineAxisScaling.Custom
verticalAxis.MaxCustomValue = 12000

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the VerticalAxis property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

spreadsheet-document-api-chart-examples/CS/SpreadsheetDocServerChartAPISamples/CodeExamples/SparklineActions.cs#L83

csharp
// Specify the vertical axis options.
SparklineVerticalAxis verticalAxis = columnGroup.VerticalAxis;
// Set the custom minimum value for the vertical axis.

spreadsheet-document-api-chart-examples/VB/SpreadsheetDocServerChartAPISamples/CodeExamples/SparklineActions.vb#L80

vb
' Specify the vertical axis options.
Dim verticalAxis As SparklineVerticalAxis = columnGroup.VerticalAxis
' Set the custom minimum value for the vertical axis.

See Also

SparklineGroup Interface

SparklineGroup Members

DevExpress.Spreadsheet Namespace