<% #This page is invoked from default action in controller. When the user clicks on a pie #slice rendered by default.html.erb, the factoryId is passed as a parameter to detailed function #in the controller. We need to get that factory id, get the information from database and then show #a detailed chart. # The xml is obtained as a string from builder template. str_xml = render :file=>"fusioncharts/db_example/factory_details", :locals=>{:factory_id=> @factory_id,:factory_name=>@factory_name,:factory_output => @factory_output_quantities} #Create the chart - Column 2D Chart with data from strXML render_chart_html '/FusionCharts/Column2D.swf', '', str_xml, 'FactoryDetailed', 600, 300, false do -%> <% end-%>