[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.ISparklineGroups.Add

Add Method

Add(SparkType, string)

Creates a new sparkline group and returns an ISparklineGroup object.

Use this method to create sparklines in the current ISparklineGroups collection from the specified source data range.

Declaration
ISparklineGroup Add(SparkType type, string sourceData)
Function Add(type As SparkType, sourceData As String) As ISparklineGroup
Parameters
Type Name Description
SparkType type

The type of sparkline.

string sourceData

The range reference string to use as the source data for the sparkline group.

Returns
Type Description
ISparklineGroup

The newly created ISparklineGroup object.

Examples
worksheet.Range["A1:C4"].Value = new object[,] {
    {1, 2, 3},
    {4, 5, 6},
    {7, 8, 9},
    {10, 11, 12}
};
ISparklineGroup sparklineGroup = worksheet.Range["D1:D4"].SparklineGroups.Add(SparkType.Line, "A1:C4");