class GruffGraff
def initialize(options)
- size = "700x400"
+ size = options[:size] ? options[:size] : "400x300" #allow custom sizing
@graph = options[:graph_type].new(size)
-
- @graph.theme = { :colors => ['#000000', '#00FFFF', '#FFCC00', '#990033'],
- :background_colors => ['#74ce00', '#ffffff'] }
+
+ @graph.no_data_message = "No Voters"
+
+ @graph.theme = { :colors => ['#005CD9', '#DC0D13', '#131313', '#990033'],
+ :background_colors => ['#74CE00', '#FFFFFF'] }
@graph.font = File.expand_path('/usr/X11R6/lib/X11/fonts/TTF/Vera.ttf',
RAILS_ROOT)
:data => data,
:interval_labels => labels,
:title => "Voters Over Time",
+ :size => "700x400",
:x_axis_label => scale,
:y_axis_label => "Number of Votes")
send_data(*graph.output)