Class CoordinateGeneral

class ooodev.calc.chart2.coordinate.coordinate_general.CoordinateGeneral(owner, chart_doc, component, lo_inst=None)[source]

Bases: LoInstPropsPartial, ComponentBase, ChartDocPropPartial, CoordinateSystemPartial, ChartTypeContainerPartial

Class for managing Chart2 Coordinate General.

Parameters:
__init__(owner, chart_doc, component, lo_inst=None)[source]

Constructor

Parameters:
  • owner (ChartDiagram) – Chart Diagram.

  • component (Any) – UNO Chart2 Coordinate General.

  • lo_inst (LoInst, optional) – Lo Instance. Use when creating multiple documents. Defaults to None.

  • chart_doc (ChartDoc) –

Return type:

None

add_chart_type(chart_types)

Add a chart type to the chart type container

Raises:

com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

Return type:

None

Parameters:

chart_types (com.sun.star.chart2.XChartType) –

get_axis_by_dimension(dimension, idx)

The dimension says whether it is a x, y or z axis.

The index indicates whether it is a primary or a secondary axis or maybe more in future. Use nIndex == 0 for a primary axis. An empty Reference will be returned if the given nDimension and nIndex are in the valid range but no axis is set for those values. An IndexOutOfBoundsException will be thrown if nDimension is lower than 0 or greater than the value returned by getDimension() and/or if nIndex is lower 0 or greater than the value returned by getMaxAxisIndexByDimension(nDimension).

Raises:

com.sun.star.lang.IndexOutOfBoundsExceptionIndexOutOfBoundsException

Return type:

XAxis

Parameters:
  • dimension (int) –

  • idx (int) –

get_chart_types()[source]

Gets all chart types.

Raises:

ChartError – If an error occurs.

Returns:

A tuple of chart types.

Return type:

Tuple[ChartType, …]

get_coordinate_system_type()

Gets the type of coordinate system (e.g.Cartesian, polar …)

Return type:

str

get_dimension()

the dimension of the coordinate-system.

Return type:

int

get_maximum_axis_index_by_dimension(dimension)

In one dimension there could be several axes to enable main and secondary axis and maybe more in future.

This method returns the maximum index at which an axis exists for the given dimension. It is allowed that some indexes in between do not have an axis.

Raises:

com.sun.star.lang.IndexOutOfBoundsExceptionIndexOutOfBoundsException

Return type:

int

Parameters:

dimension (int) –

get_view_service_name()

return a service name from which the view component for this coordinate system can be created

Return type:

str

remove_chart_type(chart_types)

Removes one data series from the chart type container.

Raises:

com.sun.star.container.NoSuchElementExceptionNoSuchElementException

Return type:

None

Parameters:

chart_types (com.sun.star.chart2.XChartType) –

set_axis_by_dimension(dimension, axis, idx)

The dimension says whether it is a x, y or z axis.

The index says whether it is a primary or a secondary axis. Use nIndex == 0 for a primary axis.

Raises:

com.sun.star.lang.IndexOutOfBoundsExceptionIndexOutOfBoundsException

Return type:

None

Parameters:
  • dimension (int) –

  • axis (com.sun.star.chart2.XAxis) –

  • idx (int) –

set_chart_types(*chart_types)

Set all chart types

Raises:

com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

Return type:

None

Parameters:

chart_types (com.sun.star.chart2.XChartType) –

property chart_diagram: ChartDiagram

Chart Diagram

Return type:

ChartDiagram

property chart_doc: ChartDoc

Chart Document.

Return type:

ChartDoc

property chart_type: ChartType[CoordinateGeneral]

Chart Type

Return type:

ChartType[CoordinateGeneral]

property component: com.sun.star.chart2.XCoordinateSystem

Coordinate General Component

Return type:

XCoordinateSystem

property lo_inst: LoInst

Lo Instance

Return type:

LoInst