module NciProjectPizza
Constants
- VERSION
Public Class Methods
function_chart(x_name, y_data_1, y_name_1, y_data_2, y_name_2)
click to toggle source
# File lib/nci_project_pizza.rb, line 16 def self.function_chart(x_name, y_data_1, y_name_1, y_data_2, y_name_2) #x_name = "Actual Price" #y_name = "Offer Price" #x_axis_variables = x_array #y_axis_variables = y_array #food_name = Food.select("foodName").group_by{|o| o.foodName}.keys if (chart_type) then case chart_type when "pie" @dyno2 = Gchart.pie(:title => "Matt vs Rob", :data => [y_data_1, y_data_2], :bar_colors => 'FF0000,00FF00', :stacked => false, :axis_with_labels => 'x,y', :axis_labels => x_name, :size => '700x400', :legend => [y_name_1, y_name2]) when "bar" @dyno1 = Gchart.bar(:title => "Matt vs Rob", :data => [y_data_1, y_data_2], :bar_colors => 'FF0000,00FF00', :stacked => false, :axis_with_labels => 'x,y', :axis_labels => x_name, :size => '700x400', :legend => [y_name_1, y_name2]) when "line" @dyno3 = Gchart.line(:title => "Matt vs Rob", :data => [y_data_1, y_data_2], :bar_colors => 'FF0000,00FF00', :stacked => false, :axis_with_labels => 'x,y', :axis_labels => x_name, :size => '700x400', :legend => [y_name_1, y_name2]) when "spline" @dyno3 = Gchart.spline(:title => "Matt vs Rob", :data => [y_data_1, y_data_2], :bar_colors => 'FF0000,00FF00', :stacked => false, :axis_with_labels => 'x,y', :axis_labels => x_name, :size => '700x400', :legend => [y_name_1, y_name2]) end end end
graph_multiObj(data_obj1, data_obj2)
click to toggle source
# File lib/nci_project_pizza.rb, line 10 def self.graph_multiObj(data_obj1, data_obj2) self.obj1 = Array.new(data_obj1.keys) self.obj2 = Array.new(data_obj2.keys) return function(obj1, obj2) end
graph_singleObj(data_obj)
click to toggle source
# File lib/nci_project_pizza.rb, line 5 def self.graph_singleObj(data_obj) self.obj1 = Array.new(data_obj.keys) return function(obj1) end