class GerbilCharts::Surfaces::Axis
Axis
- base for all axis types (attach to model)¶ ↑
Attributes
stagger_levels[R]
Public Class Methods
new(opts={})
click to toggle source
Calls superclass method
# File lib/gerbilcharts/surfaces/axis.rb, line 8 def initialize(opts={}) super(opts) set_defaults() @stagger_levels = opts[:stagger] if opts[:stagger] end
Public Instance Methods
get_stagger_off(level, offset)
click to toggle source
# File lib/gerbilcharts/surfaces/axis.rb, line 23 def get_stagger_off(level, offset) return (level % @stagger_levels) * offset end
int_render(g)
click to toggle source
# File lib/gerbilcharts/surfaces/axis.rb, line 19 def int_render(g) g.rectangle_r(@bounds, {:class => @class}) end
set_defaults()
click to toggle source
# File lib/gerbilcharts/surfaces/axis.rb, line 14 def set_defaults @class = "axispanel" @stagger_levels=1 end