Skip to main content
A newer version of this page is available. .

XlSparklineGroup.SparklineType Property

Gets or sets the type of a sparkline group.

Namespace: DevExpress.Export.Xl

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

NuGet Packages: DevExpress.Printing.Core, DevExpress.WindowsDesktop.Printing.Core

Declaration

public XlSparklineType SparklineType { get; set; }

Property Value

Type Description
XlSparklineType

A XlSparklineType enumeration member value that specifies the sparkline group type.

Available values:

Name Description
Line

Sparkline data points are plotted as a line.

Column

Sparkline data points are plotted as vertical bars.

WinLoss

Sparkline data points are plotted with identically sized bars above the horizontal axis for positive values (win) and below the horizontal axis for negative values (loss),

Example

// Create a sparkline group.                   
XlSparklineGroup group = new XlSparklineGroup(XlCellRange.FromLTRB(1, 1, 8, 6), XlCellRange.FromLTRB(9, 1, 9, 6));
// Change the sparkline group type to "Column".
group.SparklineType = XlSparklineType.Column;
// Display the horizontal axis.
group.DisplayXAxis = true;
// Set the series color.
group.ColorSeries = XlColor.FromTheme(XlThemeColor.Accent1, 0.0);
// Highlight negative points on each sparkline in the group.
group.ColorNegative = XlColor.FromTheme(XlThemeColor.Accent2, 0.0);
group.HighlightNegative = true;
sheet.SparklineGroups.Add(group);
See Also