GOffice.GraphGraph¶
- Subclasses:
None
Methods¶
- Inherited:
GOffice.GraphOutlinedObject (1), GOffice.GraphObject (40), GObject.Object (37), GOffice.StyledObject (8), GOffice.Persist (2)
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
the document for this graph |
||
r/w |
Logical graph height, in points |
||
r/w |
The theme for elements of the graph |
||
r/w |
The name of the theme for elements of the graph |
||
r/w |
Logical graph width, in points |
Signals¶
Name |
Short Description |
---|---|
The |
|
The |
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
base |
r |
||
charts |
[ |
r |
|
data |
[ |
r |
|
data_refs |
r |
||
doc |
r |
||
height |
r |
||
idle_handler |
r |
||
theme |
r |
||
width |
r |
Class Details¶
- class GOffice.GraphGraph(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod get_supported_image_formats()¶
- Returns:
- Return type:
Builds a list of supported formats for image export.
- dup()¶
- Returns:
a deep copy of self.
- Return type:
- export_image(format, output, x_dpi, y_dpi)¶
- Parameters:
format (
GOffice.ImageFormat
) – image format for exportoutput (
Gsf.Output
) – aGsf.Output
streamx_dpi (
float
) – x resolution of exported graphy_dpi (
float
) – y resolution of exported graph
- Returns:
True
if export succeed.- Return type:
Exports an image of self in given format, writing results in a
Gsf.Output
stream. If export format type is a bitmap one, it computes image size with x_dpi, y_dpi and self size (see gog_graph_get_size()).
- force_update()¶
Do an update now if one has been queued.
- get_data()¶
- Returns:
a list of the
GOffice.Data
objects that are data to the graph. The caller should _not_ modify or free the list.- Return type:
- get_document()¶
- Returns:
the document.
- Return type:
Retrieves the
GOffice.Doc
for self.
- get_size(width, height)¶
-
FIXME Returns the logical size of graph, in points.
- get_theme()¶
- Returns:
the
GOffice.GraphTheme
used by self.- Return type:
- ref_data(dat)¶
- Parameters:
dat (
GOffice.Data
) –GOffice.Data
- Returns:
dat or something equivalent to it that already exists in the graph. Otherwise use dat. Adds a gobject ref to the target and increments a
GOffice.count
of the number of refs made from thisGOffice.GraphGraph
.- Return type:
- render_to_cairo(cairo, w, h)¶
- Parameters:
cairo (
cairo.Context
) – a cairo contextw (
float
) – widthh (
float
) – height
Renders a graph using cairo. w and h are the requested width an height of the rendered graph, in the current cairo coordinate space. This function is not suited for multiple rendering of the same graph. gog_renderer_render_to cairo or
GOffice.GraphRenderer.update
/GOffice.GraphRenderer.get_cairo_surface
should be used instead.
- request_update()¶
-
queue an update if one had not already be queued.
- set_size(width, height)¶
-
Sets the logical size of graph, given in points.
- set_theme(theme)¶
- Parameters:
theme (
GOffice.GraphTheme
) –
- unref_data(dat)¶
- Parameters:
dat (
GOffice.Data
) –GOffice.Data
- validate_chart_layout()¶
-
Check the layout of the chart grid and ensure that there are no empty cols or rows, and resize as necessary
- do_add_data(input) virtual¶
- Parameters:
input (
GOffice.Data
) –
- do_remove_data(input) virtual¶
- Parameters:
input (
GOffice.Data
) –
Signal Details¶
- GOffice.GraphGraph.signals.add_data(graph_graph, data)¶
- Signal Name:
add-data
- Flags:
- Parameters:
graph_graph (
GOffice.GraphGraph
) – The object which received the signaldata (
GObject.Object
) – The newGOffice.Data
being added to graph
The
::add-data
signal is emitted BEFORE data has been added.
- GOffice.GraphGraph.signals.remove_data(graph_graph, data)¶
- Signal Name:
remove-data
- Flags:
- Parameters:
graph_graph (
GOffice.GraphGraph
) – The object which received the signaldata (
GObject.Object
) – The newGOffice.Data
being removed to graph
The
::remove-data
signal is emitted BEFORE data has been removed.
Property Details¶
- GOffice.GraphGraph.props.document¶
- Name:
document
- Type:
- Default Value:
- Flags:
the document for this graph
- GOffice.GraphGraph.props.height_pts¶
-
Logical graph height, in points
- GOffice.GraphGraph.props.theme¶
- Name:
theme
- Type:
- Default Value:
- Flags:
The theme for elements of the graph
- GOffice.GraphGraph.props.theme_name¶
-
The name of the theme for elements of the graph