Sha256: 4d62411fe1b1e8375cbd7d60a34d0bf4396b518c588a71c1bd1a28345c14bd83

Contents?: true

Size: 668 Bytes

Versions: 19

Compression:

Stored size: 668 Bytes

Contents

class FnordMetric::TimelineWidget  < FnordMetric::Widget

  def data
    @series_colors = ["#FACE4F", "#42436B", "#CD645A", "#2F635E"]

    super.merge(
      :gauges => gauges.map(&:name),
      :gauge_titles => gauge_titles,
      :start_timestamp => ticks.first,
      :end_timestamp => ticks.last,
      :autoupdate => (@opts[:autoupdate] || 60),
      :include_current => !!@opts[:include_current],
      :plot_style => (@opts[:plot_style] || 'line'),
      :tick => tick
    )
  end

  def gauge_titles
    {}.tap do |_hash|
      gauges.each do |gauge|
        _hash.merge!(gauge.name => gauge.title)
      end
    end
  end

  def has_tick?
    true
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
fnordmetric-0.7.4 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.7.3 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.7.1 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.7.0 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.6.6 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.6.5 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.6.4 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.6.3 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.6.2 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.6.1 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.6.0 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.5.9 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.5.8 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.5.7 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.5.6 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.5.5 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.5.4 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.5.3 lib/fnordmetric/timeline_widget.rb
fnordmetric-0.5.2 lib/fnordmetric/timeline_widget.rb