Class | Fusioncharts::JsonExampleController |
In: |
app/controllers/fusioncharts/json_example_controller.rb
|
Parent: | ApplicationController |
Example controller to show the usage of FusionCharts with json
A .json.erb Template is used to build the JSON data which is hard-coded. Ideally, you would generate JSON data documents in the template or action at run-time, after interfacing with forms or databases etc. render_chart function from the helper is invoked to render the chart. The action itself has no code, all the work is done in the view and json template.