Class Sparklines
Represents the sparklines.The Sparklines object is a member of the SparklineGroup collection.
The SparklineGroup collection contains all the Sparklines object of the worksheet.
Inheritance
System.Object
Sparklines
Implements
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<
ISparkline>
System.Collections.Generic.IReadOnlyCollection<
ISparkline>
System.Collections.Generic.ICollection<
ISparkline>
System.Collections.Generic.IEnumerable<
ISparkline>
System.Collections.IEnumerable
Inherited Members
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.get_Item(System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.set_Item(System.Int32, System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Add(Syncfusion.XlsIO.ISparkline)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.Add(System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.AddRange(System.Collections.Generic.IEnumerable<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.AsReadOnly()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.BinarySearch(System.Int32, System.Int32, Syncfusion.XlsIO.ISparkline, System.Collections.Generic.IComparer<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.BinarySearch(Syncfusion.XlsIO.ISparkline)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.BinarySearch(Syncfusion.XlsIO.ISparkline, System.Collections.Generic.IComparer<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Clear()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Contains(Syncfusion.XlsIO.ISparkline)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.Contains(System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.ConvertAll<TOutput>(System.Converter<Syncfusion.XlsIO.ISparkline, TOutput>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.CopyTo(Syncfusion.XlsIO.ISparkline[])
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.ICollection.CopyTo(System.Array, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.CopyTo(System.Int32, Syncfusion.XlsIO.ISparkline[], System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.CopyTo(Syncfusion.XlsIO.ISparkline[], System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Exists(System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Find(System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.FindAll(System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.FindIndex(System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.FindIndex(System.Int32, System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.FindIndex(System.Int32, System.Int32, System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.FindLast(System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.FindLastIndex(System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.FindLastIndex(System.Int32, System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.FindLastIndex(System.Int32, System.Int32, System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.ForEach(System.Action<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.GetEnumerator()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.Generic.IEnumerable<Syncfusion.XlsIO.ISparkline>.GetEnumerator()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IEnumerable.GetEnumerator()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.GetRange(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.IndexOf(Syncfusion.XlsIO.ISparkline)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.IndexOf(System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.IndexOf(Syncfusion.XlsIO.ISparkline, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.IndexOf(Syncfusion.XlsIO.ISparkline, System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Insert(System.Int32, Syncfusion.XlsIO.ISparkline)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.Insert(System.Int32, System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.InsertRange(System.Int32, System.Collections.Generic.IEnumerable<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.LastIndexOf(Syncfusion.XlsIO.ISparkline)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.LastIndexOf(Syncfusion.XlsIO.ISparkline, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.LastIndexOf(Syncfusion.XlsIO.ISparkline, System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Remove(Syncfusion.XlsIO.ISparkline)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.Remove(System.Object)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.RemoveAll(System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.RemoveAt(System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.RemoveRange(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Reverse()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Reverse(System.Int32, System.Int32)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Sort()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Sort(System.Collections.Generic.IComparer<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Sort(System.Int32, System.Int32, System.Collections.Generic.IComparer<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Sort(System.Comparison<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.ToArray()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.TrimExcess()
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.TrueForAll(System.Predicate<Syncfusion.XlsIO.ISparkline>)
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Capacity
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Count
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.IsFixedSize
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.Generic.ICollection<Syncfusion.XlsIO.ISparkline>.IsReadOnly
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.IsReadOnly
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.ICollection.IsSynchronized
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.ICollection.SyncRoot
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.Item[System.Int32]
System.Collections.Generic.List<Syncfusion.XlsIO.ISparkline>.System.Collections.IList.Item[System.Int32]
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: Syncfusion.XlsIO.Base.dll
Syntax
public class Sparklines : List<ISparkline>, IList, ICollection, IReadOnlyList<ISparkline>, IReadOnlyCollection<ISparkline>, ISparklines, IList<ISparkline>, ICollection<ISparkline>, IEnumerable<ISparkline>, IEnumerable
Constructors
Sparklines()
Declaration
Methods
Add()
Declaration
Returns
Type |
Description |
Sparkline |
the Saprkline object
|
Examples
The following example demonstrates the Add method.
ExcelEngine engine=new ExcelEngine();
IApplication app= engine.Excel;
app.DefaultVersion= ExcelVersion.Excel2010;
IWorkbook wkBook= app.Workbooks.Create(2);
IWorksheet sheet= wkBook.Worksheets[0];
ISparklineGroup spGroup= sheet.SparklineGroups.Add();
//Initialize the Saprklines
ISparklines sparklines=spGroup.Add();
//returns the sparkline object.
Sparkline sparkline=sparklines.Add();
wkBook.SaveAs("Sample.xlsx");
wkBook.Close();
Add(IRange, IRange)
Declaration
public void Add(IRange dataRange, IRange referenceRange)
Parameters
Examples
The following example demonstrates the Add method.
ExcelEngine engine=new ExcelEngine();
IApplication app= engine.Excel;
app.DefaultVersion= ExcelVersion.Excel2010;
IWorkbook wkBook= app.Workbooks.Create(2);
IWorksheet sheet= wkBook.Worksheets[0];
ISparklineGroup spGroup= sheet.SparklineGroups.Add();
//Initialize the Sparklines
ISparklines sparklines=spGroup.Add();
//Add the Sparklines data range and reference range.
sparklines.Add(sheet.Range["A1:B2"],sheet.Range["C1"],true);
wkBook.SaveAs("Sample.xlsx");
wkBook.Close();
Add(IRange, IRange, Boolean)
Declaration
public void Add(IRange dataRange, IRange referenceRange, bool isVertical)
Parameters
Type |
Name |
Description |
IRange |
dataRange |
The data range.IRange
|
IRange |
referenceRange |
The reference range.IRange
|
System.Boolean |
isVertical |
Specifies whether to plot the sparklines from the new data range by row or by column.
|
Examples
The following example demonstrates the Add method.
ExcelEngine engine=new ExcelEngine();
IApplication app= engine.Excel;
app.DefaultVersion= ExcelVersion.Excel2010;
IWorkbook wkBook= app.Workbooks.Create(2);
IWorksheet sheet= wkBook.Worksheets[0];
ISparklineGroup spGroup= sheet.SparklineGroups.Add();
//Initialize the Sparklines
ISparklines sparklines=spGroup.Add();
//Add the Sparklines data range and reference range.
sparklines.Add(sheet.Range["A1:B2"],sheet.Range["C1"],true);
wkBook.SaveAs("Sample.xlsx");
wkBook.Close();
Clear(Sparkline)
Declaration
public void Clear(Sparkline sparkline)
Parameters
Examples
The following example demonstrates the Clear Method
ExcelEngine engine=new ExcelEngine();
IApplication app= engine.Excel;
app.DefaultVersion= ExcelVersion.Excel2010;
IWorkbook wkBook= app.Workbooks.Create(2);
IWorksheet sheet= wkBook.Worksheets[0];
ISparklineGroup spGroup= sheet.SparklineGroups.Add();
//Initialize the Saprklines
ISparklines sparklines=spGroup.Add();
//Clears the Sparkline from the specified range.
sparklines.Clear(sparklines[0] as Sparkline);
wkBook.SaveAs("Sample.xlsx");
wkBook.Close();
RefreshRanges(IRange, IRange)
Declaration
public void RefreshRanges(IRange dataRange, IRange referenceRange)
Parameters
Examples
The following example demonstrates the Add method.
ExcelEngine engine=new ExcelEngine();
IApplication app= engine.Excel;
app.DefaultVersion= ExcelVersion.Excel2010;
IWorkbook wkBook= app.Workbooks.Create(2);
IWorksheet sheet= wkBook.Worksheets[0];
ISparklineGroup spGroup= sheet.SparklineGroups[0];
//Initialize the Sparklines
ISparklines sparklines=spGroup[0];
//Add the Sparklines data range and reference range.
sparklines.RefreshRanges(sheet.Range["A1:B2"],sheet.Range["C1"]);
wkBook.SaveAs("Sample.xlsx");
wkBook.Close();
RefreshRanges(IRange, IRange, Boolean)
Declaration
public void RefreshRanges(IRange dataRange, IRange referenceRange, bool isVertical)
Parameters
Type |
Name |
Description |
IRange |
dataRange |
The data range.IRange
|
IRange |
referenceRange |
The reference range.IRange
|
System.Boolean |
isVertical |
|
Examples
The following example demonstrates the Add method.
ExcelEngine engine=new ExcelEngine();
IApplication app= engine.Excel;
app.DefaultVersion= ExcelVersion.Excel2010;
IWorkbook wkBook= app.Workbooks.Create(2);
IWorksheet sheet= wkBook.Worksheets[0];
ISparklineGroup spGroup= sheet.SparklineGroups[0];
//Initialize the Sparklines
ISparklines sparklines=spGroup[0];
//Add the Sparklines data range and reference range.
sparklines.RefreshRanges(sheet.Range["A1:B2"],sheet.Range["C1"],true);
wkBook.SaveAs("Sample.xlsx");
wkBook.Close();
Implements
System.Collections.IList
System.Collections.ICollection
System.Collections.Generic.IReadOnlyList<T>
System.Collections.Generic.IReadOnlyCollection<T>
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable