Class: Scruffy::Renderers::Split
- Defined in:
- lib/scruffy/renderers/split.rb
Overview
Renderer that splits the graphs up into four other little graphs.
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Helpers::Canvas
Instance Method Summary collapse
Methods inherited from Base
#before_render, #initialize, #method_missing, #render
Methods included from Helpers::Canvas
#component, #remove, #reset_settings!
Constructor Details
This class inherits a constructor from Scruffy::Renderers::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Scruffy::Renderers::Base
Instance Method Details
#define_layout ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/scruffy/renderers/split.rb', line 5 def define_layout super do |components| components << Scruffy::Components::Title.new(:title, :position => [5, 2], :size => [90, 7]) components << Scruffy::Components::Label.new(:label_one, :text => self.[:split_label] || '', :position => [30, 54.5], :size => [40, 3]) # Viewports components << Scruffy::Components::Viewport.new(:top, :position => [3, 20], :size => [90, 30], &graph_block(:top)) components << Scruffy::Components::Viewport.new(:bottom, :position => [3, 65], :size => [90, 30], &graph_block(:bottom)) components << Scruffy::Components::Legend.new(:legend, :position => [5, 11], :size => [90, 4]) end end |