Good afternoon,
I’m working on a small app that generates some dynamic charts using
JFreeCharts.
I have a view that contains some different chart links in a side bar.
Then in the center of the page I have a div for the charts. When
clicking a chart link I would like to do the following:
- Place a spinner in the chart display div
- Generate CSV file of data to disk (I’ve got an array with the data,
writing it is no problem) - Generate chart from CSV file (done using this technique:
http://wiki.rubyonrails.org/rails/pages/HowtoGenerateJFreeCharts) - Display chart in the main div
Can this be done using an RJS template?
I built a skeleton RJS template so it would mimic what I ultimately
want to do for my page:
page.replace_html :chartStatus, ‘
Generating your chart data.
’page.visual_effect :highlight, ‘chartStatus’, :duration => 3
page.replace_html :chartDisplay, ‘
page.delay(5) do
page.replace_html :chartStatus, ‘
Done. Click chart for larger
version or right click to save.
’page.visual_effect :highlight, ‘chartStatus’, :duration => 3
page.replace_html :chartDisplay, ‘Chart goes here.’
end
I’ll plug away and see if I can find any other instances of this,
thanks in advance for any help.
-Matt