[]
Represents a collection of sparkline groups.
An ISparklineGroups object is associated with an IRange and
provides access to the sparkline groups in that range. Use this interface to
add new sparkline groups, retrieve existing groups, clear sparklines, group
selected sparklines, and iterate through the collection.
public interface ISparklineGroups : IEnumerable
Public Interface ISparklineGroups
Inherits IEnumerable
object[,] data = new object[,] {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9},
{10, 11, 12}
};
worksheet.Range["A1:C4"].Value = data;
ISparklineGroups sparklineGroups = worksheet.Range["D1:D4"].SparklineGroups;
sparklineGroups.Add(SparkType.Line, "A1:C4");
ISparklineGroup sparklineGroup = sparklineGroups[0];
| Name | Description |
|---|---|
| Count | Returns the number of sparkline groups in the associated IRange object. Use this property to determine how many sparkline groups are contained in the range before accessing individual groups. |
| this[int] | Returns the ISparklineGroup object from a collection.
Use this indexer to retrieve an existing sparkline group by its position in the
current |
| Name | Description |
|---|---|
| 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. |
| Clear() | Clears the selected sparklines. Removes the sparkline objects from the cells in the associated range without clearing the underlying worksheet data. To remove entire sparkline groups, use ClearGroups() instead. |
| ClearGroups() | Clears the selected sparkline groups. Removes the sparkline groups associated with the selected cells. Unlike Clear(), this method removes entire sparkline groups rather than only clearing individual sparkline objects from the selected cells. |
| Group(IRange) | Groups the selected sparklines. Use this method to combine existing sparklines in the associated range into a sparkline group so they share the same group settings. |
| Ungroup() | Ungroups the sparklines in the selected sparkline group. Use this method on the ISparklineGroups collection associated with the sparkline cells to remove the current grouping of those sparklines. |