# File temp/Graph/Line.rb, line 110 def max_value max = 0 if (stacked == true) then sums = Array.new(@config[:fields].length).fill(0) @data.each do |data| sums.each_index do |i| sums[i] += data[:data][i].to_f end end max = sums.max else max = @data.collect{|x| x[:data].max}.max end return max end