GOffice.GraphWidget¶
- Subclasses:
None
Methods¶
- Inherited:
Gtk.Layout (10), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Scrollable (9)
- Structs:
Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Gtk.Layout (2), Gtk.Container (3), Gtk.Widget (39), Gtk.Scrollable (4)
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/c |
Aspect ratio for rendering the graph, used only if greater than 0. |
||
r/w/co |
The graph to render. |
||
r/w/co |
Assumed horizontal screen resolution in pixels per inch. |
||
r/w/co |
Assumed vertical screen resolution in pixels per inch. |
Child Properties¶
- Inherited:
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class GOffice.GraphWidget(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(graph)¶
- Parameters:
graph (
GOffice.GraphGraph) –GOffice.GraphGraph- Returns:
the newly created
GOffice.GraphWidget.- Return type:
Creates a new
GOffice.GraphWidgetwith an embeddedGOffice.GraphGraph. If graph isNone, the graph will be auto-created, and aGOffice.GraphChartwill be added graph.
- get_chart()¶
- Returns:
the
GOffice.GraphChartcreated byGOffice.GraphWidget.new().- Return type:
- get_graph()¶
- Returns:
the
GOffice.GraphGraphembedded in the widget.- Return type:
- get_renderer()¶
- Returns:
the
GOffice.GraphRendererused by the widget.- Return type:
- set_size_mode(size_mode, width, height)¶
- Parameters:
size_mode (
GOffice.GraphWidgetSizeMode) –GOffice.GraphWidgetSizeModewidth (
int) – in pixelsheight (
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.
Property Details¶
- GOffice.GraphWidget.props.aspect_ratio¶
-
Aspect ratio for rendering the graph, used only if greater than 0.
- GOffice.GraphWidget.props.graph¶
- Name:
graph- Type:
- Default Value:
- Flags:
The graph to render.
- GOffice.GraphWidget.props.hres¶
- Name:
hres- Type:
- Default Value:
96.0- Flags:
Assumed horizontal screen resolution in pixels per inch.
- GOffice.GraphWidget.props.vres¶
- Name:
vres- Type:
- Default Value:
96.0- Flags:
Assumed vertical screen resolution in pixels per inch.