Class | Fusioncharts::ExportExampleController |
In: |
app/controllers/fusioncharts/export_example_controller.rb
|
Parent: | ApplicationController |
Contains functions to illustrate the following export features:
Demonstrates the ease of exporting FusionCharts as image or PDF. 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.
A Builder Template is used to build the XML data which is hard-coded. Ideally, you would generate XML data documents in the builder at run-time, after interfacing with forms or databases etc. Such examples are also present. We set the content-type header to text/html. render_chart function from the helper is invoked to render the chart. The function itself has no code, all the work is done in the builder and the view.