ooodev.adapter.chart2.chart_document_partial module
- class ooodev.adapter.chart2.chart_document_partial.ChartDocumentPartial(component, interface=com.sun.star.chart2.XChartDocument)[source]
Bases:
ModelPartial
Partial class for XChartDocument.
- Parameters:
component (XChartDocument) –
interface (UnoInterface | None) –
- __init__(component, interface=com.sun.star.chart2.XChartDocument)[source]
Constructor
- Parameters:
component (XChartDocument) – UNO Component that implements
com.sun.star.chart2.XChartDocument
interface.interface (UnoInterface, optional) – The interface to be validated. Defaults to
XChartDocument
.
- Return type:
None
- create_default_chart()[source]
Creates a default chart type for a brand-new chart object.
- Return type:
None
- create_internal_data_provider(clone_existing_data)[source]
creates an internal com.sun.star.chart2.XDataProvider that is handled by the chart document itself.
When the model is stored, the data provider will also be stored in a sub-storage.
- Raises:
com.sun.star.util.CloseVetoException –
CloseVetoException
- Return type:
None
- Parameters:
clone_existing_data (bool) –
- get_chart_type_manager()[source]
retrieves the component that is able to create different chart type templates (components of type ChartTypeTemplate)
- Return type:
XChartTypeManager
- get_data_provider()[source]
Returns the currently set data provider.
This may be an internal one, if createInternalDataProvider() has been called before, or an external one if XDataReceiver.attachDataProvider() has been called.
- Return type:
XDataProvider
- get_first_diagram()[source]
Notes: this is preliminary, we need an API that supports more than one diagram. The method name getDiagram exists in the css.chart API, so there is would be no way to choose either this or the other method from Basic (it would chose one or the other by random).
- Return type:
XDiagram
- get_page_background()[source]
Gives access to the page background appearance.
The area’s extent is equal to the document size. If you want to access properties of the background area of a single diagram (the part where data points are actually plotted in), you have to get its wall. You can get the wall by calling XDiagram.getWall().
- Return type:
XPropertySet
- has_internal_data_provider()[source]
This is the case directly after createInternalDataProvider() has been called, but this is not necessary. The chart can also create an internal data provider by other means, e.g. a call to com.sun.star.frame.XModel.initNew().
- Return type:
bool
- set_chart_type_manager(new_manager)[source]
Sets a new component that is able to create different chart type templates (components of type ChartTypeTemplate)
- Return type:
None
- Parameters:
new_manager (com.sun.star.chart2.XChartTypeManager) –
- set_first_diagram(diagram)[source]
Notes: this is preliminary, we need an API that supports more than one diagram. The method name setDiagram exists in the css.chart API, so there is would be no way to choose either this or the other method from Basic (it would chose one or the other by random).
- Return type:
None
- Parameters:
diagram (com.sun.star.chart2.XDiagram) –