    # File app/controllers/fusioncharts/db_example_controller.rb, line 16
      def basic_dbexample
          headers["content-type"]="text/html";
          @factory_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
              @factory_data<<{:factory_name=>factory_name,:factory_output=>total}
          end
      end