class MetricFu::StatsBluffGrapher

Public Instance Methods

graph!() click to toggle source
# File lib/graphs/engines/bluff.rb, line 88
    def graph!
      content = <<-EOS
        #{BLUFF_DEFAULT_OPTIONS}
        g.title = 'Stats: LOC & LOT';
        g.data('LOC', [#{@loc_counts.join(',')}]);
        g.data('LOT', [#{@lot_counts.join(',')}])
        g.labels = #{@labels.to_json};
        g.draw();
      EOS
      File.open(File.join(MetricFu.output_directory, 'stats.js'), 'w') {|f| f << content }
    end