Module: ZTK::GoogleChart::Base::Ticks
- Included in:
- ZTK::GoogleChart::Base
- Defined in:
- lib/ztk/google_chart/base/ticks.rb
Instance Method Summary (collapse)
Instance Method Details
- (Object) tick_seed(start_time, end_time, unit)
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/ztk/google_chart/base/ticks.rb', line 7 def tick_seed(start_time, end_time, unit) start_time = start_time.dup ticks = Array.new loop do ticks << date_scale(unit, start_time) start_time += 1.send(unit) break if (start_time > end_time) end ticks end |