Class: GOffice::GraphWidget

Inherits:
Gtk::Layout
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

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.

Parameters:

Instance Method Details

#aspect_ratioFloat

Returns aspect-ratio.

Returns:

  • (Float)

    aspect-ratio

#aspect_ratio=(aspect_ratio) ⇒ Float

Parameters:

  • aspect_ratio (Float)

Returns:

  • (Float)

    aspect-ratio

  • (Float)

    aspect-ratio

#chartGOffice::GraphChart

Returns the Gog::Chart created by go_graph_widget_new().

Returns:

#graphGOffice::GraphGraph

Returns graph.

Returns:

#graph=(graph) ⇒ GOffice::GraphGraph

Parameters:

Returns:

#hresFloat

Returns hres.

Returns:

  • (Float)

    hres

#hres=(hres) ⇒ Float

Parameters:

  • hres (Float)

Returns:

  • (Float)

    hres

  • (Float)

    hres

#rendererGOffice::GraphRenderer

Returns the Gog::Renderer used by the widget.

Returns:

#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.

Parameters:

Returns:

  • (nil)

#vresFloat

Returns vres.

Returns:

  • (Float)

    vres

#vres=(vres) ⇒ Float

Parameters:

  • vres (Float)

Returns:

  • (Float)

    vres

  • (Float)

    vres