Back to Devexpress

SparklineGroup Interface

officefileapi-devexpress-dot-spreadsheet-f0c3d371.md

latest3.7 KB
Original Source

SparklineGroup Interface

Represents a sparkline group on a worksheet.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public interface SparklineGroup
vb
Public Interface SparklineGroup

The following members return SparklineGroup objects:

Remarks

The SparklineGroup object is a member of the SparklineGroupCollection collection, containing all sparkline groups added to a worksheet.

To create a sparkline group and add it to the collection, use the SparklineGroupCollection.Add method. To access an individual SparklineGroup object in the collection, use the indexer notation.

For details on how to insert sparklines in a worksheet and adjust their settings, refer to the Sparklines section for examples.

Example

View Example

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

// Create a group of line sparklines.
SparklineGroup quarterlyGroup = worksheet.SparklineGroups.Add(worksheet["G4:G6"], worksheet["C4:F4,C5:F5,C6:F6"], SparklineGroupType.Line);
// Add one more sparkline to the existing group.
quarterlyGroup.Sparklines.Add(6, 6, worksheet["C7:F7"]);

// Display a column sparkline in the total cell.
SparklineGroup totalGroup = worksheet.SparklineGroups.Add(worksheet["G8"], worksheet["C8:F8"], SparklineGroupType.Column);
vb
Dim worksheet As Worksheet = workbook.Worksheets("SparklineExamples")
workbook.Worksheets.ActiveWorksheet = worksheet

' Create a group of line sparklines.
Dim quarterlyGroup As SparklineGroup = worksheet.SparklineGroups.Add(worksheet("G4:G6"), worksheet("C4:F4,C5:F5,C6:F6"), SparklineGroupType.Line)
' Add one more sparkline to the existing group.
quarterlyGroup.Sparklines.Add(6, 6, worksheet("C7:F7"))

' Display a column sparkline in the total cell.
Dim totalGroup As SparklineGroup = worksheet.SparklineGroups.Add(worksheet("G8"), worksheet("C8:F8"), SparklineGroupType.Column)

See Also

SparklineGroup Members

Spreadsheet Document API Examples

DevExpress.Spreadsheet Namespace