Class Sparkline

Class Sparkline

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

Bir sparkline, bir çalışma sayfası hücresinde veri için görsel bir temsil sağlayan küçük bir grafik veya grafiktir.

public class Sparkline

Miras

objectSparkline

Miras Alınan Üyeler

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Örnekler

 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'yi tanımlayın
 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("Sparklines veri aralığı: " + line.DataRange + ", satır: " + line.Row + ", sütun: " + line.Column);
 line.ToImage("output.png", new ImageOrPrintOptions());

Özellikler

Sütun

Sparklinelerin sütun indeksini alır.

public int Column { get; }

Özellik Değeri

int

VeriAralığı

Sparklinelerin veri aralığını temsil eder.

public string DataRange { get; set; }

Özellik Değeri

string

Satır

Sparklinelerin satır indeksini alır.

public int Row { get; }

Özellik Değeri

int

Metotlar

ToImage(string, ImageOrPrintOptions)

Bir sparklini bir görüntüye dönüştürür.

public void ToImage(string fileName, ImageOrPrintOptions options)

Parametreler

fileName string

Görüntü dosyası adı.

options ImageOrPrintOptions

Görüntü seçenekleri.

ToImage(Stream, ImageOrPrintOptions)

Bir sparklini bir görüntüye dönüştürür.

public void ToImage(Stream stream, ImageOrPrintOptions options)

Parametreler

stream Stream

Görüntü akışı.

options ImageOrPrintOptions

Görüntü seçenekleri.

 Türkçe