Class ChartCollection

Class ChartCollection

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

รวบรวมคอลเลกชันของวัตถุ Aspose.Cells.Charts.Chart

public class ChartCollection : CollectionBase<chart>, IList<chart>, ICollection<chart>, IEnumerable<chart>, ICollection, IEnumerable

การสืบทอด

objectCollectionBase<chart>ChartCollection

การใช้งาน

IList<chart>, ICollection<chart>, IEnumerable<chart>, ICollection, IEnumerable

สมาชิกที่สืบทอด

CollectionBase<chart>.BinarySearch(Chart), CollectionBase<chart>.BinarySearch(Chart, IComparer<chart>), CollectionBase<chart>.BinarySearch(int, int, Chart, IComparer<chart>), CollectionBase<chart>.Contains(Chart), CollectionBase<chart>.CopyTo(Chart[]), CollectionBase<chart>.CopyTo(Chart[], int), CollectionBase<chart>.CopyTo(int, Chart[], int, int), CollectionBase<chart>.Exists(Predicate<chart>), CollectionBase<chart>.Find(Predicate<chart>), CollectionBase<chart>.FindAll(Predicate<chart>), CollectionBase<chart>.FindIndex(Predicate<chart>), CollectionBase<chart>.FindIndex(int, Predicate<chart>), CollectionBase<chart>.FindIndex(int, int, Predicate<chart>), CollectionBase<chart>.FindLast(Predicate<chart>), CollectionBase<chart>.FindLastIndex(Predicate<chart>), CollectionBase<chart>.FindLastIndex(int, Predicate<chart>), CollectionBase<chart>.FindLastIndex(int, int, Predicate<chart>), CollectionBase<chart>.IndexOf(Chart), CollectionBase<chart>.IndexOf(Chart, int), CollectionBase<chart>.IndexOf(Chart, int, int), CollectionBase<chart>.LastIndexOf(Chart), CollectionBase<chart>.LastIndexOf(Chart, int), CollectionBase<chart>.LastIndexOf(Chart, int, int), CollectionBase<chart>.GetEnumerator(), CollectionBase<chart>.Clear(), CollectionBase<chart>.RemoveAt(int), CollectionBase<chart>.OnClearComplete(), CollectionBase<chart>.OnClear(), CollectionBase<chart>.Capacity, CollectionBase<chart>.Count, CollectionBase<chart>.InnerList, CollectionBase<chart>.this[int], object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

ตัวอย่าง

Workbook workbook = new Workbook();

ChartCollection charts = workbook.Worksheets[0].Charts;
Dim workbook as Workbook = new Workbook()

Dim ChartCollection as Charts = workbook.Worksheets(0).Charts

คุณสมบัติ

this[int]

ดึงองค์ประกอบ Aspose.Cells.Charts.Chart ที่ตำแหน่งดัชนีที่ระบุ

public Chart this[int index] { get; }

ค่าของคุณสมบัติ

Chart

this[string]

ดึงกราฟตามชื่อ

public Chart this[string name] { get; }

ค่าของคุณสมบัติ

Chart

หมายเหตุ

ชื่อกราฟเริ่มต้นคือ null ดังนั้นคุณต้องตั้งชื่อกราฟอย่างชัดเจน

วิธีการ

Add(ChartType, int, int, int, int)

เพิ่มกราฟไปยังคอลเลกชัน

public int Add(ChartType type, int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn)

พารามิเตอร์

type ChartType

ประเภทกราฟ

upperLeftRow int

ดัชนีแถวซ้ายบน

upperLeftColumn int

ดัชนีคอลัมน์ซ้ายบน

lowerRightRow int

ดัชนีแถวขวาล่าง

lowerRightColumn int

ดัชนีคอลัมน์ขวาล่าง

คืนค่า

int

ดัชนีของวัตถุ Aspose.Cells.Charts.Chart

Add(byte[], string, bool, int, int, int, int)

เพิ่มกราฟด้วยเทมเพลตที่ตั้งไว้ล่วงหน้า

public int Add(byte[] data, string dataRange, bool isVertical, int topRow, int leftColumn, int rightRow, int bottomColumn)

พารามิเตอร์

data byte[]

ข้อมูลของไฟล์เทมเพลตกราฟ(.crtx)

dataRange string

ระบุช่วงข้อมูลของกราฟ

isVertical bool

ระบุว่าจะแสดงชุดข้อมูลจากช่วงของค่าเซลล์ตามแถวหรือคอลัมน์

topRow int

ดัชนีแถวซ้ายบน

leftColumn int

ดัชนีคอลัมน์ซ้ายบน

rightRow int

ดัชนีแถวขวาล่าง

bottomColumn int

ดัชนีคอลัมน์ขวาล่าง

คืนค่า

int

ดัชนีของวัตถุ Aspose.Cells.Charts.Chart

Add(ChartType, string, bool, int, int, int, int)

เพิ่มกราฟไปยังคอลเลกชัน

public int Add(ChartType type, string dataRange, bool isVertical, int topRow, int leftColumn, int rightRow, int bottomColumn)

พารามิเตอร์

type ChartType

ประเภทกราฟ

dataRange string

ระบุช่วงข้อมูลของกราฟ

isVertical bool

ระบุว่าจะแสดงชุดข้อมูลจากช่วงของค่าเซลล์ตามแถวหรือคอลัมน์

topRow int

ดัชนีแถวซ้ายบน

leftColumn int

ดัชนีคอลัมน์ซ้ายบน

rightRow int

ดัชนีแถวขวาล่าง

bottomColumn int

ดัชนีคอลัมน์ขวาล่าง

คืนค่า

int

ดัชนีของวัตถุ Aspose.Cells.Charts.Chart

AddFloatingChart(ChartType, int, int, int, int)

เพิ่มกราฟไปยังคอลเลกชัน

public int AddFloatingChart(ChartType type, int left, int top, int width, int height)

พารามิเตอร์

type ChartType

ประเภทกราฟ

left int

การเลื่อน x ไปที่มุม

top int

การเลื่อน y ไปที่มุม

width int

ความกว้างของกราฟ

height int

ความสูงของกราฟ

คืนค่า

int

ดัชนีของวัตถุ Aspose.Cells.Charts.Chart

Clear()

ลบกราฟทั้งหมด

public void Clear()

RemoveAt(int)

ลบกราฟที่ตำแหน่งดัชนีที่ระบุ

public void RemoveAt(int index)

พารามิเตอร์

index int

ดัชนีของกราฟ

 แบบไทย