Class: MetricFu::Grapher
- Inherits:
-
Object
- Object
- MetricFu::Grapher
- Includes:
- GchartGrapher
- Defined in:
- lib/graphs/grapher.rb,
lib/graphs/engines/bluff.rb,
lib/graphs/engines/gchart.rb
Direct Known Subclasses
FlayGrapher, FlogGrapher, RailsBestPracticesGrapher, RcovGrapher, ReekGrapher, RoodiGrapher, StatsGrapher
Constant Summary collapse
- BLUFF_GRAPH_SIZE =
"1000x600"
- BLUFF_DEFAULT_OPTIONS =
<<-EOS var g = new Bluff.Line('graph', "#{BLUFF_GRAPH_SIZE}"); g.theme_37signals(); g.tooltips = true; g.title_font_size = "24px" g.legend_font_size = "12px" g.marker_font_size = "10px" EOS
Constants included from GchartGrapher
MetricFu::GchartGrapher::COLORS, MetricFu::GchartGrapher::GCHART_GRAPH_SIZE, MetricFu::GchartGrapher::NUMBER_OF_TICKS
Instance Attribute Summary collapse
-
#labels ⇒ Object
Returns the value of attribute labels.
Class Method Summary collapse
Instance Method Summary collapse
- #get_metrics(metrics, date) ⇒ Object
-
#initialize ⇒ Grapher
constructor
A new instance of Grapher.
Methods included from GchartGrapher
Constructor Details
#initialize ⇒ Grapher
Returns a new instance of Grapher.
5 6 7 8 |
# File 'lib/graphs/grapher.rb', line 5 def initialize self.class.require_graphing_gem @labels = {} end |
Instance Attribute Details
#labels ⇒ Object
Returns the value of attribute labels.
3 4 5 |
# File 'lib/graphs/grapher.rb', line 3 def labels @labels end |
Class Method Details
.require_graphing_gem ⇒ Object
10 11 12 |
# File 'lib/graphs/grapher.rb', line 10 def self.require_graphing_gem # to be overridden by charting engines end |
Instance Method Details
#get_metrics(metrics, date) ⇒ Object
14 15 16 |
# File 'lib/graphs/grapher.rb', line 14 def get_metrics(metrics, date) @labels.update( { @labels.size => date }) end |