class Scruffy::Renderers::Cubed

Scruffy::Renderers::Cubed

Author

Brasten Sager

Date

August 14th, 2006

Graph layout consisting of four separate graphs arranged in a 2x2 grid.

Constants

VIEWPORTS
VIEWPORT_SIZE

Public Instance Methods

define_layout() click to toggle source

Returns a Cubed instance.

# File lib/scruffy/renderers/cubed.rb, line 16
def define_layout
  super do |components|
    components << Scruffy::Components::Title.new(:title, :position => [5, 2], :size => [90, 7])
                  
    VIEWPORTS.each_pair do |category, position|
      components << Scruffy::Components::Viewport.new(category, :position => position, 
                                                      :size => VIEWPORT_SIZE, &graph_block(category))
    end

    components << Scruffy::Components::Legend.new(:legend, :position => [5, 13], :size => [90, 5])
  end
end