XlSparklineGroup.SparklineType Property
In This Article
Gets or sets the type of a sparkline group.
Namespace: DevExpress.Export.Xl
Assembly: DevExpress.Printing.v24.2.Core.dll
NuGet Package: DevExpress.Printing.Core
#Declaration
public XlSparklineType SparklineType { get; set; }
#Property Value
Type | Description |
---|---|
Xl |
A Xl |
Available values:
Name | Description |
---|---|
Line | Sparkline data points are plotted as a line. |
Column | Sparkline data points are plotted as vertical bars. |
Win |
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
Note
A complete sample project is available at https://github.
// 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