Class: MetricFu::FlayGchartGrapher

Inherits:
FlayGrapher show all
Defined in:
lib/graphs/engines/gchart.rb

Constant Summary

Constants inherited from Grapher

Grapher::BLUFF_DEFAULT_OPTIONS, Grapher::BLUFF_GRAPH_SIZE

Constants included from GchartGrapher

GchartGrapher::COLORS, GchartGrapher::GCHART_GRAPH_SIZE, GchartGrapher::NUMBER_OF_TICKS

Instance Attribute Summary

Attributes inherited from FlayGrapher

#flay_score, #labels

Instance Method Summary collapse

Methods inherited from FlayGrapher

#get_metrics, #initialize

Methods inherited from Grapher

#initialize, require_graphing_gem

Methods included from GchartGrapher

#determine_y_axis_scale

Constructor Details

This class inherits a constructor from MetricFu::FlayGrapher

Instance Method Details

#graph!Object



35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/graphs/engines/gchart.rb', line 35

def graph!
  determine_y_axis_scale(@flay_score)
  url = Gchart.line(
    :size => GCHART_GRAPH_SIZE,
    :title => URI.escape("Flay: duplication"),
    :data => @flay_score,
    :max_value => @max_value,
    :axis_with_labels => 'x,y',
    :axis_labels => [@labels.values, @yaxis],
    :format => 'file',
    :filename => File.join(MetricFu.output_directory, 'flay.png'))
end