Class Sparkline
Class Sparkline
Namespace: Aspose.Cells.Charts
Assembly: Aspose.Cells.dll (25.2.0)
ספארקליין מייצגת גרף קטן או גרפיקה בתא גיליון עבודה המספקת ייצוג חזותי של נתונים.
public class Sparkline
ירושה
חברים מורשים
object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
דוגמאות
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);
// הגדרת אזור התא
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, sheet.Name + "!A1:D1", false, ca);
SparklineGroup group = sheet.SparklineGroups[idx];
idx = group.Sparklines.Add(sheet.Name + "!A1:D1", 0, 4);
Sparkline line = group.Sparklines[idx];
Console.WriteLine("טווח נתוני ספארקליין: " + line.DataRange + ", שורה: " + line.Row + ", עמודה: " + line.Column);
line.ToImage("output.png", new ImageOrPrintOptions());
מאפיינים
עמודה
מקבל את אינדקס העמודה של הספארקליין.
public int Column { get; }
ערך המאפיין
DataRange
מייצגת את טווח הנתונים של הספארקליין.
public string DataRange { get; set; }
ערך המאפיין
שורה
מקבל את אינדקס השורה של הספארקליין.
public int Row { get; }
ערך המאפיין
שיטות
ToImage(string, ImageOrPrintOptions)
ממיר ספארקליין לתמונה.
public void ToImage(string fileName, ImageOrPrintOptions options)
פרמטרים
fileName
string
שם קובץ התמונה.
options
ImageOrPrintOptions
אפשרויות התמונה
ToImage(Stream, ImageOrPrintOptions)
ממיר ספארקליין לתמונה.
public void ToImage(Stream stream, ImageOrPrintOptions options)
פרמטרים
stream
Stream
זרם התמונה.
options
ImageOrPrintOptions
אפשרויות התמונה.