lib/squid/graph.rb in squid-1.1.0 vs lib/squid/graph.rb in squid-1.2.0
- old
+ new
@@ -1,7 +1,7 @@
require 'active_support'
-require 'active_support/core_ext/string/inflections' # for titleize
+require 'active_support/core_ext/string/inflections' # for singularize
require 'squid/axis'
require 'squid/axis_label'
require 'squid/gridline'
require 'squid/plotter'
@@ -34,10 +34,10 @@
draw_charts if chart
draw_categories if baseline
end
def draw_legend
- labels = @data.keys.reverse.map{|key| key.to_s.titleize}
+ labels = @data.keys.reverse.map{|key| key.to_s}
right = legend.is_a?(Hash) ? legend.fetch(:right, 0) : 0
@plot.legend labels, right: right, colors: colors, height: legend_height
end
def draw_gridlines