Class Fusioncharts::DbDrilldownController
In: app/controllers/fusioncharts/db_drilldown_controller.rb
Parent: ApplicationController

Methods

default   detailed  

Public Instance methods

In this function, we obtain total output of quantities and name of each factory from the database and plot them on a pie-chart. It stores URL to the "detailed" function in a variable passing FactoryId as parameter to the function which returns quantity produced and date of production of the factory that are obtained from database and which are plotted in a chart. This action retrieves the values from the database and constructs an array to hold, factory name, corresponding total output quantity and URL to the action which will generate the detailed chart. The view for this action default.html.erb will use the array values to construct the xml for this chart. To build the xml, the view takes help from the builder file (default_factories_quantity.builder)

This action retrieves the quantity and date of production of the factory identified by the request parameter expected "FactoryId" The view for this action is detailed.html.erb and it uses the builder file factory_details.builder to build the xml for the column chart.

[Validate]