public class ChartCollection extends CollectionBase
Chart objects.
Example
Workbook workbook = new Workbook();
ChartCollection charts = workbook.getWorksheets().get(0).getCharts();
| Modifier and Type | Method and Description |
|---|---|
int |
add(byte[] data,
java.lang.String dataRange,
boolean isVertical,
int topRow,
int leftColumn,
int rightRow,
int bottomColumn)
Adds a chart with preset template.
|
int |
add(int type,
int upperLeftRow,
int upperLeftColumn,
int lowerRightRow,
int lowerRightColumn)
Adds a chart to the collection.
|
int |
add(int type,
java.lang.String dataRange,
boolean isVertical,
int topRow,
int leftColumn,
int rightRow,
int bottomColumn)
Adds a chart to the collection.
|
int |
add(int type,
java.lang.String dataRange,
int topRow,
int leftColumn,
int rightRow,
int bottomColumn)
Deprecated.
Use ChartCollection.Add(ChartType, string, bool ,int , int, int, int ) instead.
|
int |
addFloatingChart(int type,
int left,
int top,
int width,
int height)
Adds a chart to the collection.
|
void |
clear()
Clear all charts.
|
Chart |
get(int index)
Gets the
Chart element at the specified index. |
Chart |
get(java.lang.String name)
Gets the chart by the name.
|
void |
remove(Chart chart)
Remove the specific chart.
|
void |
removeAt(int index)
Remove a chart at the specific index.
|
public int addFloatingChart(int type,
int left,
int top,
int width,
int height)
public int add(int type,
int upperLeftRow,
int upperLeftColumn,
int lowerRightRow,
int lowerRightColumn)
public int add(int type,
java.lang.String dataRange,
int topRow,
int leftColumn,
int rightRow,
int bottomColumn)
Remarks
NOTE: This member is now obsolete. Instead, please useadd(int,String,boolean,int,int,int,int) property.
This property will be removed 12 months later since May 2022.
Aspose apologizes for any inconvenience you may have experienced.public int add(byte[] data,
java.lang.String dataRange,
boolean isVertical,
int topRow,
int leftColumn,
int rightRow,
int bottomColumn)
data - The data of chart template file(.crtx).dataRange - Specifies the data range of the chartisVertical - Specifies whether to plot the series from a range of cell values by row or by column.topRow - Upper left row index.leftColumn - Upper left column index.rightRow - Lower right row indexbottomColumn - Lower right column indexChart object index.public int add(int type,
java.lang.String dataRange,
boolean isVertical,
int topRow,
int leftColumn,
int rightRow,
int bottomColumn)
type - ChartType. Chart typedataRange - Specifies the data range of the chartisVertical - Specifies whether to plot the series from a range of cell values by row or by column.topRow - Upper left row index.leftColumn - Upper left column index.rightRow - Lower right row indexbottomColumn - Lower right column indexChart object index.public Chart get(int index)
Chart element at the specified index.get in class CollectionBaseindex - The zero based index of the element.public Chart get(java.lang.String name)
Remarks
The default chart name is null. So you have to explicitly set the name of the chart.name - The chart name.public void remove(Chart chart)
chart - public void removeAt(int index)
removeAt in class CollectionBaseindex - The chart index.public void clear()
clear in class CollectionBaseSee Also:
Aspose.Cells Documentation - the home page for the Aspose.Cells Product Documentation.
Aspose.Cells Support Forum - our preferred method of support.
We guarantee a prompt response to any inquiry!
© Aspose Pty Ltd 2003-2025. All Rights Reserved.