IXlSheet.SparklineGroups Property
Provides access to a collection of sparkline groups in a worksheet.
Namespace: DevExpress.Export.Xl
Assembly: DevExpress.Printing.v24.2.Core.dll
NuGet Package: DevExpress.Printing.Core
#Declaration
IList<XlSparklineGroup> SparklineGroups { get; }
#Property Value
Type | Description |
---|---|
IList<Xl |
A collection of Xl |
#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®).
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.
// 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);