## ChartCollection::Add(ChartType, int32_t, int32_t, int32_t, int32_t) method


Adds a chart to the collection.

```cpp
int32_t Aspose::Cells::Charts::ChartCollection::Add(ChartType type, int32_t topRow, int32_t leftColumn, int32_t bottomRow, int32_t rightColumn)
```


| Parameter | Type | Description |
| --- | --- | --- |
| type | ChartType | [Chart](../../chart/) type |
| topRow | int32_t | Upper left row index. |
| leftColumn | int32_t | Upper left column index. |
| bottomRow | int32_t | Lower right row index |
| rightColumn | int32_t | Lower right column index |

## ReturnValue

[Chart](../../chart/) object index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Enum [ChartType](../../charttype/)
* Class [ChartCollection](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## ChartCollection::Add(const Vector \<uint8_t\>\&, const U16String\&, bool, int32_t, int32_t, int32_t, int32_t) method


Adds a chart with preset template.

```cpp
int32_t Aspose::Cells::Charts::ChartCollection::Add(const Vector<uint8_t> &data, const U16String &dataRange, bool isVertical, int32_t topRow, int32_t leftColumn, int32_t rightRow, int32_t bottomColumn)
```


| Parameter | Type | Description |
| --- | --- | --- |
| data | const Vector \<uint8_t\>\& | The data of chart template file(.crtx). |
| dataRange | const U16String\& | Specifies the data range of the chart |
| isVertical | bool | Specifies whether to plot the series from a range of cell values by row or by column. |
| topRow | int32_t | Upper left row index. |
| leftColumn | int32_t | Upper left column index. |
| rightRow | int32_t | Lower right row index |
| bottomColumn | int32_t | Lower right column index |

## ReturnValue

[Chart](../../chart/) object index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [ChartCollection](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## ChartCollection::Add(const Vector \<uint8_t\>\&, const char16_t*, bool, int32_t, int32_t, int32_t, int32_t) method


Adds a chart with preset template.

```cpp
int32_t Aspose::Cells::Charts::ChartCollection::Add(const Vector<uint8_t> &data, const char16_t *dataRange, bool isVertical, int32_t topRow, int32_t leftColumn, int32_t rightRow, int32_t bottomColumn)
```


| Parameter | Type | Description |
| --- | --- | --- |
| data | const Vector \<uint8_t\>\& | The data of chart template file(.crtx). |
| dataRange | const char16_t* | Specifies the data range of the chart |
| isVertical | bool | Specifies whether to plot the series from a range of cell values by row or by column. |
| topRow | int32_t | Upper left row index. |
| leftColumn | int32_t | Upper left column index. |
| rightRow | int32_t | Lower right row index |
| bottomColumn | int32_t | Lower right column index |

## ReturnValue

[Chart](../../chart/) object index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Class [ChartCollection](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## ChartCollection::Add(ChartType, const U16String\&, bool, int32_t, int32_t, int32_t, int32_t) method


Adds a chart to the collection.

```cpp
int32_t Aspose::Cells::Charts::ChartCollection::Add(ChartType type, const U16String &dataRange, bool isVertical, int32_t topRow, int32_t leftColumn, int32_t rightRow, int32_t bottomColumn)
```


| Parameter | Type | Description |
| --- | --- | --- |
| type | ChartType | [Chart](../../chart/) type |
| dataRange | const U16String\& | Specifies the data range of the chart |
| isVertical | bool | Specifies whether to plot the series from a range of cell values by row or by column. |
| topRow | int32_t | Upper left row index. |
| leftColumn | int32_t | Upper left column index. |
| rightRow | int32_t | Lower right row index |
| bottomColumn | int32_t | Lower right column index |

## ReturnValue

[Chart](../../chart/) object index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Enum [ChartType](../../charttype/)
* Class [U16String](../../../aspose.cells/u16string/)
* Class [ChartCollection](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
## ChartCollection::Add(ChartType, const char16_t*, bool, int32_t, int32_t, int32_t, int32_t) method


Adds a chart to the collection.

```cpp
int32_t Aspose::Cells::Charts::ChartCollection::Add(ChartType type, const char16_t *dataRange, bool isVertical, int32_t topRow, int32_t leftColumn, int32_t rightRow, int32_t bottomColumn)
```


| Parameter | Type | Description |
| --- | --- | --- |
| type | ChartType | [Chart](../../chart/) type |
| dataRange | const char16_t* | Specifies the data range of the chart |
| isVertical | bool | Specifies whether to plot the series from a range of cell values by row or by column. |
| topRow | int32_t | Upper left row index. |
| leftColumn | int32_t | Upper left column index. |
| rightRow | int32_t | Lower right row index |
| bottomColumn | int32_t | Lower right column index |

## ReturnValue

[Chart](../../chart/) object index.

## See Also

* Class [Vector](../../../aspose.cells/vector/)
* Enum [ChartType](../../charttype/)
* Class [ChartCollection](../)
* Namespace [Aspose::Cells::Charts](../../)
* Library [Aspose.Cells for C++](../../../)
