Skip to main content

XlSparklineGroup.HighlightHighest Property

Gets or sets whether the highest data point in the sparkline should be colored differently.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v24.1.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public bool HighlightHighest { get; set; }

Property Value

Type Description
Boolean

True to highlight the highest data point; otherwise, false.

Example

Note

A complete sample project is available at https://github.com/DevExpress-Examples/excel-export-api-examples

// 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;
// Set the series color.
group.ColorSeries = XlColor.FromTheme(XlThemeColor.Accent1, 0.0);
// Set the color for negative points on sparklines. 
group.ColorNegative = XlColor.FromTheme(XlThemeColor.Accent2, 0.0);
// Set the color for the highest points on sparklines.
group.ColorHigh = XlColor.FromTheme(XlThemeColor.Accent6, 0.0);
// Highlight the highest and negative points on each sparkline in the group.
group.HighlightNegative = true;
group.HighlightHighest = true;
sheet.SparklineGroups.Add(group);
See Also