GOffice.GraphWidget¶
| Subclasses: | None | 
|---|
Methods¶
| class | new(graph) | 
| get_chart() | |
| get_graph() | |
| get_renderer() | |
| set_size_mode(size_mode, width, height) | 
Virtual Methods¶
| Inherited: | Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Scrollable (1) | 
|---|
Properties¶
| Inherited: | Gtk.Layout (2), Gtk.Container (3), Gtk.Widget (39), Gtk.Scrollable (4) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| aspect-ratio | float | r/w/c | Aspect ratio for rendering the graph, used only if greater than 0. | 
| graph | GOffice.GraphGraph | r/w/co | The graph to render. | 
| hres | float | r/w/co | Assumed horizontal screen resolution in pixels per inch. | 
| vres | float | r/w/co | Assumed vertical screen resolution in pixels per inch. | 
Child Properties¶
| Inherited: | Gtk.Layout (2) | 
|---|
Style Properties¶
| Inherited: | Gtk.Widget (17) | 
|---|
Signals¶
| Inherited: | Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
Fields¶
| Inherited: | Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
Class Details¶
- 
class GOffice.GraphWidget(**kwargs)¶
- Bases: - Gtk.Layout- Abstract: - No - Structure: - GOffice.GraphWidgetClass- 
classmethod new(graph)¶
- Parameters: - graph ( - GOffice.GraphGraph) –- GOffice.GraphGraph- Returns: - the newly created - GOffice.GraphWidget.- Return type: - Gtk.Widget- Creates a new - GOffice.GraphWidgetwith an embedded- GOffice.GraphGraph. If graph is- None, the graph will be auto-created, and a- GOffice.GraphChartwill be added graph.
 - 
get_chart()¶
- Returns: - the - GOffice.GraphChartcreated by- GOffice.GraphWidget.new().- Return type: - GOffice.GraphChart
 - 
get_graph()¶
- Returns: - the - GOffice.GraphGraphembedded in the widget.- Return type: - GOffice.GraphGraph
 - 
get_renderer()¶
- Returns: - the - GOffice.GraphRendererused by the widget.- Return type: - GOffice.GraphRenderer
 - 
set_size_mode(size_mode, width, height)¶
- Parameters: - size_mode (GOffice.GraphWidgetSizeMode) –GOffice.GraphWidgetSizeMode
- width (int) – in pixels
- height (int) – in pixels
 - Sets the size mode of the - GOffice.GraphWidget. It is used to determine the size and position of the drawn chart. The following sizing modes are supported:- GOffice.GraphWidgetSizeMode.FIT, aspect ratio set. The aspect ratio is guaranteed to be maintained, i.e. the graph is never squeezed, and will always fit into the visible area.- GOffice.GraphWidgetSizeMode.FIT, no aspect ratio set. The aspect ratio is adapted to make the graph exactly fit into the visible area.- GOffice.GraphWidgetSizeMode.FIT_WIDTH, aspect ratio set. The aspect ratio is guaranteed to be maintained, i.e. the graph is never squezzed, and will always occupy the whole width of the visible area.- GOffice.GraphWidgetSizeMode.FIT_HEIGHT, aspect ratio set. The aspect ratio is guaranteed to be maintained, i.e. the graph is never squezzed, and will always occupy the whole height of the visible area.- GO_GRAPH_WIDGET_SIZE_MODE_FIT_FIXED_SIZE, no aspect ratio set. The graph will occupy the area specified by width/height, its aspect ratio will be determined by height/width. 
- size_mode (
 
- 
classmethod 
Property Details¶
- 
GOffice.GraphWidget.props.aspect_ratio¶
- Name: - aspect-ratio- Type: - float- Default Value: - -1.0- Flags: - READABLE,- WRITABLE,- CONSTRUCT- Aspect ratio for rendering the graph, used only if greater than 0. 
- 
GOffice.GraphWidget.props.graph¶
- Name: - graph- Type: - GOffice.GraphGraph- Default Value: - None- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- The graph to render. 
- 
GOffice.GraphWidget.props.hres¶
- Name: - hres- Type: - float- Default Value: - 96.0- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- Assumed horizontal screen resolution in pixels per inch. 
- 
GOffice.GraphWidget.props.vres¶
- Name: - vres- Type: - float- Default Value: - 96.0- Flags: - READABLE,- WRITABLE,- CONSTRUCT_ONLY- Assumed vertical screen resolution in pixels per inch.