]> projects.mako.cc - selectricity-live/commitdiff
Fixed a bug in the graph library.
author<mako@atdot.cc> <>
Sat, 11 Aug 2007 00:38:51 +0000 (20:38 -0400)
committer<mako@atdot.cc> <>
Sat, 11 Aug 2007 00:38:51 +0000 (20:38 -0400)
app/controllers/graph_controller.rb

index 8a11a42d1d9bfe607161d26056dff706c202c95f..38025effe8ee15ef907353f244a93e08c62b6ccf 100644 (file)
@@ -12,12 +12,12 @@ class GraphController < ApplicationController
                                    RAILS_ROOT)
       
       # fill in the data with the optional data name
                                    RAILS_ROOT)
       
       # fill in the data with the optional data name
-      @graph.data( options.fetch(:data_name, nil), options[:data] )
+      @graph.data( options.fetch(:data_name, "Data"), options[:data] )
 
       # set the labels or create an empty hash
       @graph.labels = options[:interval_labels] \
         if options.has_key?(:interval_labels) and \
 
       # set the labels or create an empty hash
       @graph.labels = options[:interval_labels] \
         if options.has_key?(:interval_labels) and \
-           options[:interval_labels].class = Hash
+           options[:interval_labels].class == Hash
       @graph.x_axis_label = options[:x_axis_label] \
         if options.has_key?(:x_axis_label)
       @graph.y_axis_label = options[:y_axis_label] \
       @graph.x_axis_label = options[:x_axis_label] \
         if options.has_key?(:x_axis_label)
       @graph.y_axis_label = options[:y_axis_label] \

Benjamin Mako Hill || Want to submit a patch?