Hi I have this method. When i run it the @arr_data returns no value, so the graph remains empty. When i hard-code the value in the array, like this @arr_data << [''test'', ''1234''] it works. What i am doing wrong?? def stacked headers["content-type"]="text/html"; @arr_data = [] #Get data from factory masters table factory_masters = Fusioncharts::FactoryMaster.find(:all) factory_masters.each do |factory_master| total = 0.0 factory_id = factory_master.id factory_name = factory_master.name factory_master.factory_output_quantities.each do |factory_output| total = total + factory_output.quantity end # Push the hash of values into the array @arr_data << {:factory_name=>factory_name,:factory_output=>total} end end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---