Class: MetricFu::Grapher

Inherits:
Object
  • Object
show all
Includes:
GchartGrapher
Defined in:
lib/graphs/grapher.rb,
lib/graphs/engines/bluff.rb,
lib/graphs/engines/gchart.rb

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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from GchartGrapher

#determine_y_axis_scale

Constructor Details

#initializeGrapher

Returns a new instance of Grapher.



3
4
5
# File 'lib/graphs/grapher.rb', line 3

def initialize
  self.class.require_graphing_gem
end

Class Method Details

.require_graphing_gemObject



7
8
9
# File 'lib/graphs/grapher.rb', line 7

def self.require_graphing_gem
  # to be overridden by charting engines
end