Note
The chart object is currently still lacking a lot of important methods/attributes.
Note
Check out the What’s New regarding the latest changes to the Chart object.
A chart object that represents an existing Excel chart can be created with the following arguments:
Chart(1) Chart('Sheet1', 1) Chart(1, 1)
Chart('Chart 1') Chart('Sheet1', 'Chart 1') Chart(1, 'Chart 1')
If no worksheet name is provided as first argument (as name or index), it will take the chart from the active sheet.
To insert a new chart into Excel, create it as follows:
Chart().add()
Parameters: |
|
---|
Inserts a new chart in Excel.
Parameters: |
|
---|
Gets and sets the name of a chart
Gets and sets the chart type of a chart
Makes the chart the active chart.
Sets the source for the chart
Parameters: | source (Range) – xlwings Range object, e.g. Range('A1') |
---|