Class ChartCollection
Namespace: Aspose.Cells.Charts
Assembly: Aspose.Cells.dll (25.2.0)
Encapsula una colección de objetos Aspose.Cells.Charts.Chart.
public class ChartCollection : CollectionBase<chart>, IList<chart>, ICollection<chart>, IEnumerable<chart>, ICollection, IEnumerable
Herencia
object ← CollectionBase<chart> ← ChartCollection
Implementa
IList<chart>, ICollection<chart>, IEnumerable<chart>, ICollection, IEnumerable
Miembros heredados
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()
Ejemplos
Workbook workbook = new Workbook();
ChartCollection charts = workbook.Worksheets[0].Charts;
Dim workbook as Workbook = new Workbook()
Dim ChartCollection as Charts = workbook.Worksheets(0).Charts
Propiedades
this[int]
Obtiene el elemento Aspose.Cells.Charts.Chart en el índice especificado.
public Chart this[int index] { get; }
Valor de la propiedad
this[string]
Obtiene el gráfico por el nombre.
public Chart this[string name] { get; }
Valor de la propiedad
Observaciones
El nombre de gráfico predeterminado es nulo. Por lo tanto, debes establecer explícitamente el nombre del gráfico.
Métodos
Add(ChartType, int, int, int, int)
Agrega un gráfico a la colección.
public int Add(ChartType type, int upperLeftRow, int upperLeftColumn, int lowerRightRow, int lowerRightColumn)
Parámetros
type
ChartType
Tipo de gráfico
upperLeftRow
int
Índice de fila superior izquierda.
upperLeftColumn
int
Índice de columna superior izquierda.
lowerRightRow
int
Índice de fila inferior derecha
lowerRightColumn
int
Índice de columna inferior derecha
Retorna
Índice del objeto Aspose.Cells.Charts.Chart.
Add(byte[], string, bool, int, int, int, int)
Agrega un gráfico con plantilla preestablecida.
public int Add(byte[] data, string dataRange, bool isVertical, int topRow, int leftColumn, int rightRow, int bottomColumn)
Parámetros
data
byte[]
Los datos del archivo de plantilla de gráfico (.crtx).
dataRange
string
Especifica el rango de datos del gráfico
isVertical
bool
Especifica si se deben trazar las series desde un rango de valores de celda por fila o por columna.
topRow
int
Índice de fila superior izquierda.
leftColumn
int
Índice de columna superior izquierda.
rightRow
int
Índice de fila inferior derecha
bottomColumn
int
Índice de columna inferior derecha
Retorna
Índice del objeto Aspose.Cells.Charts.Chart.
Add(ChartType, string, bool, int, int, int, int)
Agrega un gráfico a la colección.
public int Add(ChartType type, string dataRange, bool isVertical, int topRow, int leftColumn, int rightRow, int bottomColumn)
Parámetros
type
ChartType
Tipo de gráfico
dataRange
string
Especifica el rango de datos del gráfico
isVertical
bool
Especifica si se deben trazar las series desde un rango de valores de celda por fila o por columna.
topRow
int
Índice de fila superior izquierda.
leftColumn
int
Índice de columna superior izquierda.
rightRow
int
Índice de fila inferior derecha
bottomColumn
int
Índice de columna inferior derecha
Retorna
Índice del objeto Aspose.Cells.Charts.Chart.
AddFloatingChart(ChartType, int, int, int, int)
Agrega un gráfico a la colección.
public int AddFloatingChart(ChartType type, int left, int top, int width, int height)
Parámetros
type
ChartType
Tipo de gráfico
left
int
El desplazamiento x a la esquina
top
int
El desplazamiento y a la esquina
width
int
El ancho del gráfico
height
int
La altura del gráfico
Retorna
Índice del objeto Aspose.Cells.Charts.Chart.
Clear()
Elimina todos los gráficos.
public void Clear()
RemoveAt(int)
Elimina un gráfico en el índice específico.
public void RemoveAt(int index)
Parámetros
index
int
El índice del gráfico.