Skip to main content

IXlSheet.SparklineGroups Property

Provides access to a collection of sparkline groups in a worksheet.

Namespace: DevExpress.Export.Xl

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

NuGet Package: DevExpress.Printing.Core

Declaration

IList<XlSparklineGroup> SparklineGroups { get; }

Property Value

Type Description
IList<XlSparklineGroup>

A collection of XlSparklineGroup objects contained in a worksheet.

Remarks

A sparkline is a tiny chart located in the background of a worksheet cell and used to visualize the data variations over time. For example, the image below shows line sparklines that demonstrate changes in quarterly sales for different states (the workbook is opened in Microsoft® Excel®).

SpreadsheetControl_SparklineCommonAppearance

To create a new group of sparklines, use the XlSparklineGroup constructor. To add the created sparkline group to a worksheet, call the Add method of the worksheet’s collection of sparkline groups, accessible using the SparklineGroups property (see the example below).

Note

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

// Create a group of line sparklines.
XlSparklineGroup group = new XlSparklineGroup(XlCellRange.FromLTRB(1, 1, 4, 6), XlCellRange.FromLTRB(5, 1, 5, 6));
// Set the sparkline weight.
group.LineWeight = 1.25;
// Display data markers on the sparklines.
group.DisplayMarkers = true;
sheet.SparklineGroups.Add(group);
See Also