GOffice.GraphGraph¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GOffice.GraphOutlinedObject (1), GOffice.GraphObject (40), GObject.Object (37), GOffice.StyledObject (8), GOffice.Persist (2) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | get_supported_image_formats() | 
| dup() | |
| export_image(format, output, x_dpi, y_dpi) | |
| force_update() | |
| get_data() | |
| get_document() | |
| get_size(width, height) | |
| get_theme() | |
| num_cols() | |
| num_rows() | |
| ref_data(dat) | |
| render_to_cairo(cairo, w, h) | |
| request_update() | |
| set_size(width, height) | |
| set_theme(theme) | |
| unref_data(dat) | |
| validate_chart_layout() | 
Virtual Methods¶
| Inherited: | GOffice.GraphStyledObject (2), GOffice.GraphObject (18), GObject.Object (7) | 
|---|
| do_add_data(input) | |
| do_remove_data(input) | 
Properties¶
| Inherited: | GOffice.GraphOutlinedObject (1), GOffice.GraphObject (8) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| document | GOffice.Doc | r/w | the document for this graph | 
| height-pts | float | r/w | Logical graph height, in points | 
| theme | GOffice.GraphTheme | r/w | The theme for elements of the graph | 
| theme-name | str | r/w | The name of the theme for elements of the graph | 
| width-pts | float | r/w | Logical graph width, in points | 
Signals¶
| Inherited: | GOffice.GraphStyledObject (1), GOffice.GraphObject (7), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| add-data | The ::add-datasignal is emitted BEFORE data has been added. | 
| remove-data | The ::remove-datasignal is emitted BEFORE data has been removed. | 
Fields¶
| Inherited: | GOffice.GraphStyledObject (1), GOffice.GraphObject (7), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| base | GOffice.GraphOutlinedObject | r | |
| charts | [ object] | r | |
| data | [ object] | r | |
| data_refs | { object:object} | r | |
| doc | GOffice.Doc | r | |
| height | float | r | |
| idle_handler | int | r | |
| theme | GOffice.GraphTheme | r | |
| width | float | r | 
Class Details¶
- 
class GOffice.GraphGraph(**kwargs)¶
- Bases: - GOffice.GraphOutlinedObject,- GOffice.Persist- Abstract: - No - Structure: - GOffice.GraphGraphClass- 
classmethod get_supported_image_formats()¶
- Returns: - a - GLib.SListof- GOffice.ImageFormat.- Return type: - [ - GOffice.ImageFormat]- Builds a list of supported formats for image export. 
 - 
dup()¶
- Returns: - a deep copy of self. - Return type: - GOffice.GraphGraph
 - 
export_image(format, output, x_dpi, y_dpi)¶
- Parameters: - format (GOffice.ImageFormat) – image format for export
- output (Gsf.Output) – aGsf.Outputstream
- x_dpi (float) – x resolution of exported graph
- y_dpi (float) – y resolution of exported graph
 - Returns: - Trueif export succeed.- Return type: - Exports an image of self in given format, writing results in a - Gsf.Outputstream. 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()).
- format (
 - 
force_update()¶
- Do an update now if one has been queued. 
 - 
get_data()¶
- Returns: - a list of the - GOffice.Dataobjects that are data to the graph. The caller should _not_ modify or free the list.- Return type: - [ - GOffice.Data]
 - 
get_document()¶
- Returns: - the document. - Return type: - GOffice.Doc- Retrieves the - GOffice.Docfor self.
 - 
get_size(width, height)¶
- Parameters: - FIXME Returns the logical size of graph, in points. 
 - 
get_theme()¶
- Returns: - the - GOffice.GraphThemeused by self.- Return type: - GOffice.GraphTheme
 - 
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.countof the number of refs made from this- GOffice.GraphGraph.- Return type: - GOffice.Data
 - 
render_to_cairo(cairo, w, h)¶
- Parameters: - cairo (cairo.Context) – a cairo context
- w (float) – width
- h (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_surfaceshould be used instead.
- cairo (
 - 
request_update()¶
- Returns: - Trueif a handler has been added.- Return type: - bool- queue an update if one had not already be queued. 
 - 
set_size(width, height)¶
- Parameters: - 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()¶
- Returns: - Trueif anything changed.- Return type: - bool- 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) –
 
- 
classmethod 
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 signal
- data (GObject.Object) – The newGOffice.Databeing added to graph
 - The - ::add-datasignal is emitted BEFORE data has been added.
- graph_graph (
- 
GOffice.GraphGraph.signals.remove_data(graph_graph, data)¶
- Signal Name: - remove-data- Flags: - Parameters: - graph_graph (GOffice.GraphGraph) – The object which received the signal
- data (GObject.Object) – The newGOffice.Databeing removed to graph
 - The - ::remove-datasignal is emitted BEFORE data has been removed.
- graph_graph (
Property Details¶
- 
GOffice.GraphGraph.props.document¶
- Name: - document- Type: - GOffice.Doc- Default Value: - None- Flags: - READABLE,- WRITABLE- the document for this graph 
- 
GOffice.GraphGraph.props.height_pts¶
- Name: - height-pts- Type: - float- Default Value: - 226.77165354330708- Flags: - READABLE,- WRITABLE- Logical graph height, in points 
- 
GOffice.GraphGraph.props.theme¶
- Name: - theme- Type: - GOffice.GraphTheme- Default Value: - None- Flags: - READABLE,- WRITABLE- The theme for elements of the graph