## ChartCollection类
封装 [`Chart`](/cells/python-net/zh/aspose.cells.charts/chart) 个对象的集合。



ChartCollection 类型公开以下成员：

### 属性
|属性|描述|
| :- | :- |
| [capacity](/cells/python-net/zh/aspose.cells.charts/chartcollection/capacity) |获取或设置数组列表可包含的元素数量。|


### 方法
|方法|描述|
| :- | :- |
| [`add(self, type, upper_left_row, upper_left_column, lower_right_row, lower_right_column)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/add/#aspose.cells.charts.charttype-int-int-int-int) |将图表添加到集合中。|
| [`add(self, type, data_range, top_row, left_column, right_row, bottom_column)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/add/#aspose.cells.charts.charttype-str-int-int-int-int) |将图表添加到集合中。|
| [`add(self, data, data_range, is_vertical, top_row, left_column, right_row, bottom_column)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/add/#bytes-str-bool-int-int-int-int) |添加带有预设模板的图表。|
| [`add(self, type, data_range, is_vertical, top_row, left_column, right_row, bottom_column)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/add/#aspose.cells.charts.charttype-str-bool-int-int-int-int) |将图表添加到集合中。|
| [`get(self, index)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/get/#int) |通过 .Net 添加 API for Python，因为不支持 this[int index]|
| [`get(self, name)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/get/#str) |通过 .Net 添加 API for Python，因为此[string Chart]不受支持|
| [`copy_to(self, array)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/copy_to/#list) |将整个数组列表复制到兼容的一维数组列表，从目标数组列表的开头开始。|
| [`copy_to(self, index, array, array_index, count)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/copy_to/#int-list-int-int) |从目标数组列表的指定索引开始，将数组列表中的一系列元素复制到兼容的一维数组列表中。|
| [`index_of(self, item, index)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/index_of/#aspose.cells.charts.chart-int) |搜索指定的对象并返回从指定索引延伸到最后一个元素的数组列表中元素范围内第一个出现的从零开始的索引。|
| [`index_of(self, item, index, count)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/index_of/#aspose.cells.charts.chart-int-int) |搜索指定的对象并返回从指定索引开始并包含指定数量元素的数组列表中元素范围内第一次出现的从零开始的索引。|
| [`last_index_of(self, item)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/last_index_of/#aspose.cells.charts.chart) |搜索指定的对象并返回整个数组列表中最后一次出现的从零开始的索引。|
| [`last_index_of(self, item, index)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/last_index_of/#aspose.cells.charts.chart-int) |搜索指定的对象并返回从第一个元素延伸到指定索引的数组列表中元素范围内的最后一个出现的从零开始的索引。|
| [`last_index_of(self, item, index, count)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/last_index_of/#aspose.cells.charts.chart-int-int) |搜索指定的对象并返回包含指定数量的元素并以指定索引结束的数组列表中元素范围内的最后一个出现的从零开始的索引。|
| [`add_floating_chart(self, type, left, top, width, height)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/add_floating_chart/#aspose.cells.charts.charttype-int-int-int-int) |将图表添加到集合中。|
| [`binary_search(self, item)`](/cells/python-net/zh/aspose.cells.charts/chartcollection/binary_search/#aspose.cells.charts.chart) |使用默认比较器在整个排序数组列表中搜索元素，并返回该元素从零开始的索引。|



### 例子

```python
from aspose.cells import Workbook

workbook = Workbook()
charts = workbook.worksheets[0].charts

```

### 也可以看看
* 模块[`aspose.cells.charts`](..)
* 类 [`Chart`](/cells/python-net/zh/aspose.cells.charts/chart)
