SparklineCollection

SparklineCollection class

Encapsule une collection deSparkline objets.

public class SparklineCollection : CollectionBase<Sparkline>

Propriétés

NomLa description
Capacity { get; set; }
Count { get; }
Item { get; }Obtient leSparkline élément à l’index spécifié.
Item { get; set; }

Méthodes

NomLa description
Add(string, int, int)Ajouter un sparkline.
BinarySearch(Sparkline)
BinarySearch(Sparkline, IComparer<Sparkline>)
BinarySearch(int, int, Sparkline, IComparer<Sparkline>)
Clear()
Contains(Sparkline)
CopyTo(Sparkline[])
CopyTo(Sparkline[], int)
CopyTo(int, Sparkline[], int, int)
Exists(Predicate<Sparkline>)
Find(Predicate<Sparkline>)
FindAll(Predicate<Sparkline>)
FindIndex(Predicate<Sparkline>)
FindIndex(int, Predicate<Sparkline>)
FindIndex(int, int, Predicate<Sparkline>)
FindLast(Predicate<Sparkline>)
FindLastIndex(Predicate<Sparkline>)
FindLastIndex(int, Predicate<Sparkline>)
FindLastIndex(int, int, Predicate<Sparkline>)
GetEnumerator()
IndexOf(Sparkline)
IndexOf(Sparkline, int)
IndexOf(Sparkline, int, int)
LastIndexOf(Sparkline)
LastIndexOf(Sparkline, int)
LastIndexOf(Sparkline, int, int)
Remove(object)Supprime le sparkline
RemoveAt(int)

Exemples

[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);

// Définir la CellArea
CellArea ca = new CellArea();
ca.StartColumn = 4;
ca.EndColumn = 4;
ca.StartRow = 0;
ca.EndRow = 0;

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

Voir également