Back to Devexpress

SparklinePoints Interface

officefileapi-devexpress-dot-spreadsheet-96e7e66a.md

latest4.0 KB
Original Source

SparklinePoints Interface

Contains marker options for data points on the sparklines in a sparkline group.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public interface SparklinePoints
vb
Public Interface SparklinePoints

The following members return SparklinePoints objects:

Remarks

Use the SparklineGroup.Points property to access an object exposing the SparklinePoints interface. Use the object’s properties to display important data points on a sparkline. For example, you can highlight markers for the first and last data points (SparklinePoints.First and SparklinePoints.Last), highest and lowest values (SparklinePoints.Highest and SparklinePoints.Lowest), or all values that are less than zero (SparklinePoints.Negative).

The example below demonstrates how to use the SparklinePoints.Markers property to show data markers on the line sparklines, and set specific colors for the highest and lowest data points on each sparkline in the group.

View Example

csharp
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);
vb
Dim worksheet As Worksheet = workbook.Worksheets("SparklineExamples")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a group of line sparklines.
Dim lineGroup As SparklineGroup = 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(&H1F, &H49, &H7D)

' Set the sparkline weight.
lineGroup.LineWeight = 1.5

' Display data markers on the sparklines and specify their color.
Dim points As SparklinePoints = lineGroup.Points
points.Markers.IsVisible = True
points.Markers.Color = Color.FromArgb(&H4B, &HAC, &HC6)

' Highlight the highest and lowest points on each sparkline in the group.
points.Highest.Color = Color.FromArgb(&HA9, &HD6, &H4F)
points.Lowest.Color = Color.FromArgb(&H80, &H64, &HA2)

See Also

SparklinePoints Members

DevExpress.Spreadsheet Namespace