Class | Fusioncharts::DbExampleController |
In: |
app/controllers/fusioncharts/db_example_controller.rb
|
Parent: | ApplicationController |
There are two examples in this controller. *Pie-chart for total ouput quantities of each factory by getting data from database and using dataXML method *Pie-chart for total ouput quantities of each factory and a link to another chart which gives detailed information for selected factory All the views related to this controller will use the "common" layout. As per Ruby On Rails conventions, we have the corresponding views with the same name as the function name in the controller.
This action retrieves the Factory data which holds factory name and corresponding total output quantity. The view for this action basic_dbexample will use these values to construct the xml for this chart. To build the xml, the view takes help of the builder file (basic_factories_quantity.builder)
This action retrieves the factory data, sets the default value of @animate_chart to 1 if ":animate" is not present in the request. 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 factory data for the given "FactoryId" parameter 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.