Class SparklineGroupCollection

Class SparklineGroupCollection

Namespace: Aspose.Cells.Charts
Assembly: Aspose.Cells.dll (25.2.0)

Encapsulates a collection of Aspose.Cells.Charts.SparklineGroup objects.

public class SparklineGroupCollection : CollectionBase<sparklinegroup>, IList<sparklinegroup>, ICollection<sparklinegroup>, IEnumerable<sparklinegroup>, ICollection, IEnumerable

Inheritance

objectCollectionBase<sparklinegroup>SparklineGroupCollection

Implements

IList<sparklinegroup>, ICollection<sparklinegroup>, IEnumerable<sparklinegroup>, ICollection, IEnumerable

Inherited Members

CollectionBase<sparklinegroup>.BinarySearch(SparklineGroup), CollectionBase<sparklinegroup>.BinarySearch(SparklineGroup, IComparer<sparklinegroup>), CollectionBase<sparklinegroup>.BinarySearch(int, int, SparklineGroup, IComparer<sparklinegroup>), CollectionBase<sparklinegroup>.Contains(SparklineGroup), CollectionBase<sparklinegroup>.CopyTo(SparklineGroup[]), CollectionBase<sparklinegroup>.CopyTo(SparklineGroup[], int), CollectionBase<sparklinegroup>.CopyTo(int, SparklineGroup[], int, int), CollectionBase<sparklinegroup>.Exists(Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.Find(Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.FindAll(Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.FindIndex(Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.FindIndex(int, Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.FindIndex(int, int, Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.FindLast(Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.FindLastIndex(Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.FindLastIndex(int, Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.FindLastIndex(int, int, Predicate<sparklinegroup>), CollectionBase<sparklinegroup>.IndexOf(SparklineGroup), CollectionBase<sparklinegroup>.IndexOf(SparklineGroup, int), CollectionBase<sparklinegroup>.IndexOf(SparklineGroup, int, int), CollectionBase<sparklinegroup>.LastIndexOf(SparklineGroup), CollectionBase<sparklinegroup>.LastIndexOf(SparklineGroup, int), CollectionBase<sparklinegroup>.LastIndexOf(SparklineGroup, int, int), CollectionBase<sparklinegroup>.GetEnumerator(), CollectionBase<sparklinegroup>.Clear(), CollectionBase<sparklinegroup>.RemoveAt(int), CollectionBase<sparklinegroup>.OnClearComplete(), CollectionBase<sparklinegroup>.OnClear(), CollectionBase<sparklinegroup>.Capacity, CollectionBase<sparklinegroup>.Count, CollectionBase<sparklinegroup>.InnerList, CollectionBase<sparklinegroup>.this[int], object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Examples

csharp
[C#]
Workbook book = new Workbook(); 
Worksheet sheet = book.Worksheets[0];

sheet.Cells["A1"].PutValue(5);
sheet.Cells["B1"].PutValue(2);
sheet.Cells["C1"].PutValue(1);
sheet.Cells["D1"].PutValue(3);

// Define the CellArea
CellArea ca = new CellArea();
ca.StartColumn = 4;
ca.EndColumn = 4;
ca.StartRow = 0;
ca.EndRow = 0;

int idx = sheet.SparklineGroups.Add(Aspose.Cells.Charts.SparklineType.Line, "A1:D1", false, ca);
SparklineGroup group = sheet.SparklineGroups[idx];
group.Sparklines.Add(sheet.Name + "!A1:D1", 0, 4);
book.Save("output.xlsx", SaveFormat.Xlsx);

Properties

this[int]

Gets the Aspose.Cells.Charts.SparklineGroup element at the specified index.

public SparklineGroup this[int index] { get; }

Property Value

SparklineGroup

Methods

Add(SparklineType)

Adds an Aspose.Cells.Charts.SparklineGroup with a Aspose.Cells.Charts.Sparkline to the collection.

public int Add(SparklineType type)

Parameters

type SparklineType

Specifies the type of the Sparkline group.

Returns

int

Aspose.Cells.Charts.SparklineGroup object index.

Add(SparklineType, string, bool, CellArea)

Adds an Aspose.Cells.Charts.SparklineGroup with Aspose.Cells.Charts.Sparkline to the collection.

public int Add(SparklineType type, string dataRange, bool isVertical, CellArea locationRange)

Parameters

type SparklineType

Specifies the type of the Sparkline group.

dataRange string

Specifies the data range of the sparkline group.

isVertical bool

Specifies whether to plot the sparklines from the data range by row or by column.

locationRange CellArea

Specifies where the sparklines to be placed.

Returns

int

Aspose.Cells.Charts.SparklineGroup object index.

ClearSparklineGroups(CellArea)

Clears the sparkline groups that overlaps an area of cells.

public void ClearSparklineGroups(CellArea cellArea)

Parameters

cellArea CellArea

Specifies the area of cells

ClearSparklines(CellArea)

Clears the sparklines that is inside an area of cells.

public void ClearSparklines(CellArea cellArea)

Parameters

cellArea CellArea

Specifies the area of cells </sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup></sparklinegroup>