Table J: The documents of the separate chart-related atomic actions (left column) and the integrated CreateChart action (right column). The arguments and usages of each separate action are merged and a new example of using the integrated CreateChart is provided in the document of the integrated CreateChart action. For clarity, the redundant contents are substituted with ellipsis.
The documents of the separate chart-related actions	The document of the integrated CreateChart action
CreateChart:
args: "(source: str,destSheet: str, chartType: str, chartName: str, XField: int = None, YField: List[int] = [])"
args explanation:
source (string): The range which contains the data used to create the chart.
destSheet (string): The name of the sheet where the chart will be located.
chartType (string): The type of chart. It can be 'Area', 'AreaStacked', 'BarClustered', 'BarOfPie', 'BarStacked', 'Bubble', 'ColumnClustered', 'ColumnStacked', 'Line', 'LineMarkers', 'LineMarkersStacked', 'LineStacked', 'Pie', 'XYScatter', 'XYScatterLines', 'XYScatterLinesNoMarkers', 'XYScatterSmooth', 'XYScatterSmoothNoMarkers', '3DPie'.
chartName (string): The name for the chart to be created.
XField (int): The index of the column which contains the X values, starting from 1. If XField is None, the first column will be used.
YField (List[int]): The indices of the columns which contain the Y values, starting from 1. If YField is [], all columns except the first column will be used.
usage: Create a chart based on the data from the source range. Please note that if you use data from a pivot table to create a chart, use the API 'CreateChart-FromPivotTable' instead.
example:
# Example 1: Create a chart in Sheet2 based on the data from A1 to B10 in Sheet1 and set the chart name to 'Chart1'.
CreateChart (source='Sheet1!A1:B10', destSheet='Sheet2', chart-Type='ColumnClustered', chartName='Chart1')
# After implementing this action, a chart named 'Chart1' will be created in Sheet2 based on the data from A1 to B10 in Sheet1.
...
SetChartTitle:
args: "("chartName: str, title: str, fontSize: float = None, bold: bool = None, color: str = None)"
args explanation: ...
example:
SetChartHasAxis:
args: "("chartName: str, axis: str, hasAxis: bool)"
args explanation: ...
example:
SetChartAxis:
args: "("chartName: str, axis: str, title: str = None, labelOrientation: str = None, maxValue: float = None, miniValue: float = None)"
args explanation: ...
example:
SetChartHasLegend:
args: "("chartName: str, hasLegend: bool)"
args explanation: ...
example:
SetChartLegend:
args: "("chartName: str, position: str = None, kBSize: str = None, seriesName: list = [])"
args explanation: ...
example:
SetChartType:
args: "("chartName: str, chartType: str)"
args explanation: ...
example:
AddDataLabels:
args: "("chartName: str)"
args explanation: ...
example:
AddChartErrorBars:
args: "("chartName: str)"
args explanation: ...
example:
SetChartMarker:
args: "("chartName: str, style: List[str] = None, size: float = None)"
args explanation: ...
usage: Set marker for the chart.
example:	CreateChart:
args: "(source: str,destSheet: str, chartType: str, chartName: str, XField: int = None, YField: List[int] = [], title: str = None, titleSize: float = None, titleBold: bool = None, titleColor: str = None, hasLegend: bool = None, legendPosition: str = None, legendSize: float = None, legendNames: list = [], hasErrorBars: bool = None, hasDataLabels: bool = None, markerStyle: List[str] = None, makerSize: float = None, trendlineType: List[str] = None, trendlineDisplayEquation: bool = None, trendlineDisplayRSquared: bool = None, hasXAxis: bool = None, XAxisTitle: str = None, hasYAxis: bool = None, YAxisTitle: str = None)"
args explanation: ...
usage: Create a chart based on the data from the source range and also set all properties at creation time. Note that it is not allowed to set the properties for an existing Chart. Please note that if you use data from a pivot table to create a chart, use the API 'CreateChartFromPivotTable' instead.
example:
# Example 1: Create a chart in Sheet2 based on the data from A1 to B10 in Sheet1 and set the chart name to 'Chart1'.
CreateChart (source='Sheet1!A1:B10', destSheet='Sheet2', chart-Type='ColumnClustered', chartName='Chart1')
# After implementing this action, a chart named 'Chart1' will be created in Sheet1 based on the data from A1 to B10 in Sheet1.
# Example 2: Create a chart based on the data from A1 to B10 in Sheet1 and set the chart title to 'Chart1 Title'.
CreateChart (source='Sheet1!A1:B10', destSheet='Sheet1', chart-Type='ColumnClustered', chartName='Chart1', title='Chart1 Title')
# After implementing this action, a chart named 'Chart1' will be created in Sheet1 based on the data from A1 to B10 and the chart title will be set to 'Chart1 Title'.
# Example 3: Create a chart named 'Chart1' and set title, marker, X Y-axis titles, legend, and trendline.
CreateChart (source='Sheet1!A1:C10', destSheet='Sheet1', chart-Type='ColumnClustered', chartName='Chart1', XField=1, YField=[2,3], title='Chart1 Title', hasLegend=True, legendPosition='bottom', markingStyle=['circle','triangle'], trendlineType=['polynomial'], trendlineDisplayEquation=True, trendlineDisplayRSquared=True, hasXAxis=True, XAxisTitle='X-axis', hasYAxis=True, YAxisTitle='Y-axis')
# After implementing this action, a chart named 'Chart1' will be created in Sheet1 based on the data from A1 to C10 and the chart title will be set to 'Chart1 Title'. The first column will be used as X values and the second and third columns will be used as Y values. The legend will be displayed at the bottom. The first series will have circle marker and the second series will have triangle marker. A polynomial trendline will be added to the chart and the equation and R squared will be displayed. The X-axis title will be set to 'X-axis' and the Y-axis title will be set to 'Y-axis'.