.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

SparklineGroup.Points Property

Provides access to the settings that control the visual appearance of sparkline data points.

Namespace: DevExpress.Spreadsheet

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

Declaration

SparklinePoints Points { get; }
ReadOnly Property Points As SparklinePoints

Property Value

Type Description
SparklinePoints

A SparklinePoints object that contains the marker options.

Remarks

Use the Points property to highlight important data points on a sparkline. For example, you can differentiate markers for the first and last data points (SparklinePoints.First and SparklinePoints.Last), highest and lowest values (SparklinePoints.Highest and SparklinePoints.Lowest), or negative values (SparklinePoints.Negative) by using a specific color to paint each point.

The example below demonstrates how to create a group of line sparklines and customize its appearance. Use the SparklinePoints.Markers property to display data markers on a line, and then utilize different colors to highlight the highest and lowest data points on each sparkline.

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

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

// Customize the group appearance.
// Set the sparkline color.
lineGroup.SeriesColor = Color.FromArgb(0x1F, 0x49, 0x7D);

// Set the sparkline weight.
lineGroup.LineWeight = 1.5;

// Display data markers on the sparklines and specify their color.
SparklinePoints points = lineGroup.Points;
points.Markers.IsVisible = true;
points.Markers.Color = Color.FromArgb(0x4B, 0xAC, 0xC6);

// Highlight the highest and lowest points on each sparkline in the group.
points.Highest.Color = Color.FromArgb(0xA9, 0xD6, 0x4F);
points.Lowest.Color = Color.FromArgb(0x80, 0x64, 0xA2);
See Also