Class: GOffice::GraphWidget
- Inherits:
-
Gtk::Layout
- Object
- Gtk::Layout
- GOffice::GraphWidget
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#aspect_ratio ⇒ Float
Aspect-ratio.
- #aspect_ratio=(aspect_ratio) ⇒ Float
-
#chart ⇒ GOffice::GraphChart
The Gog::Chart created by go_graph_widget_new().
-
#graph ⇒ GOffice::GraphGraph
Graph.
- #graph=(graph) ⇒ GOffice::GraphGraph
-
#hres ⇒ Float
Hres.
- #hres=(hres) ⇒ Float
-
#initialize(graph) ⇒ Gtk::Widget
constructor
Creates a new GOGraph::Widget with an embedded #GogGraph.
-
#renderer ⇒ GOffice::GraphRenderer
The Gog::Renderer used by the widget.
-
#set_size_mode(size_mode, width, height) ⇒ nil
Sets the size mode of the GOGraph::Widget.
-
#vres ⇒ Float
Vres.
- #vres=(vres) ⇒ Float
Constructor Details
#initialize(graph) ⇒ Gtk::Widget
Creates a new GOGraph::Widget with an embedded #GogGraph. If graph is NULL, the graph will be auto-created, and a Gog::Chart will be added graph.
Instance Method Details
#aspect_ratio ⇒ Float
Returns aspect-ratio.
#aspect_ratio=(aspect_ratio) ⇒ Float
#chart ⇒ GOffice::GraphChart
Returns the Gog::Chart created by go_graph_widget_new().
#graph ⇒ GOffice::GraphGraph
Returns graph.
#graph=(graph) ⇒ GOffice::GraphGraph
#hres ⇒ Float
Returns hres.
#hres=(hres) ⇒ Float
#renderer ⇒ GOffice::GraphRenderer
Returns the Gog::Renderer used by the widget.
#set_size_mode(size_mode, width, height) ⇒ nil
Sets the size mode of the GOGraph::Widget. It is used to determine the size and position of the drawn chart. The following sizing modes are supported:
GO_GRAPH_WIDGET_SIZE_MODE_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.
GO_GRAPH_WIDGET_SIZE_MODE_FIT, no aspect ratio set. The aspect ratio is adapted to make the graph exactly fit into the visible area.
GO_GRAPH_WIDGET_SIZE_MODE_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.
GO_GRAPH_WIDGET_SIZE_MODE_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.
#vres ⇒ Float
Returns vres.