Sparkline
محتويات
[
يخفي
]Sparkline class
يمثل خط المؤشر مخططًا أو رسمًا صغيرًا في خلية ورقة عمل توفر تمثيلًا مرئيًا للبيانات.
[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);
// تحديد 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];
idx = group.SparklineCollection.Add(sheet.Name + "!A1:D1", 0, 4);
Sparkline line = group.SparklineCollection[idx];
Console.WriteLine($"Saprkline data range:{line.DataRange}, row:{line.Row}, column:{line.Column}");
line.ToImage("output.png", new ImageOrPrintOptions());
public class Sparkline
الخصائص
اسم | وصف |
---|---|
Column { get; } | الحصول على فهرس عمود خط المؤشر . |
DataRange { get; set; } | يمثل نطاق بيانات خط المؤشر. |
Row { get; } | يحصل على فهرس صف خط المؤشر . |
طُرق
اسم | وصف |
---|---|
ToImage(ImageOrPrintOptions) | تحويل خط مؤشر إلى صورة . |
ToImage(Stream, ImageOrPrintOptions) | تحويل خط مؤشر إلى صورة . |
ToImage(string, ImageOrPrintOptions) | تحويل خط مؤشر إلى صورة . |
أنظر أيضا
- مساحة الاسم Aspose.Cells.Charts
- المجسم Aspose.Cells