Skip to main content

XlSparklineGroup.DateRange Property

Gets or sets the date range for the sparkline group.

Namespace: DevExpress.Export.Xl

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

Declaration

public XlCellRange DateRange { get; set; }

Property Value

Type Description
XlCellRange

A XlCellRange object that contains the date values for the sparkline data.

Remarks

To space the sparkline markers in respect to the date of the data set so that the space between markers becomes parallel to the date difference between them, assign the cell range containing dates to the DateRange property. This will automatically convert the horizontal axis to the date axis and change the space between data markers.

Example

XlExportExamples_Sparklines_DateRange

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.Parse("B2:E7"), XlCellRange.Parse("F2:F7"));
// Specify the date range for the sparkline group. 
group.DateRange = XlCellRange.Parse("B1:E1");
// Set the sparkline weight.
group.LineWeight = 1.25;
// Display data markers on the sparklines.
group.DisplayMarkers = true;
sheet.SparklineGroups.Add(group);
See Also