Class: Scruffy::Renderers::Pie
- Defined in:
- lib/scruffy/renderers/pie.rb
Overview
Scruffy::Renderers::Base
- Author
-
A.J. Ostman
- Date
-
August 14th, 2006
Provides a more appropriate rendering for Pie Charts. Does not show grid or Data markers, but does add Pie Value Markers.
Instance Attribute Summary
Attributes inherited from Base
Attributes included from Helpers::Canvas
Instance Method Summary collapse
-
#initialize ⇒ Pie
constructor
A new instance of Pie.
Methods inherited from Base
#before_render, #method_missing, #render
Methods included from Helpers::Canvas
#component, #remove, #reset_settings!
Constructor Details
#initialize ⇒ Pie
Returns a new instance of Pie.
11 12 13 14 15 16 17 |
# File 'lib/scruffy/renderers/pie.rb', line 11 def initialize self.components = [] self.components << Scruffy::Components::Background.new(:background, :position => [0,0], :size =>[100, 100]) self.components << Scruffy::Components::Graphs.new(:graphs, :position => [-15, 12], :size => [90, 88]) self.components << Scruffy::Components::Title.new(:title, :position => [5, 2], :size => [90, 7]) self.components << Scruffy::Components::Legend.new(:legend, :position => [60, 15], :size => [40, 88], :vertical_legend => true) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Scruffy::Renderers::Base