Topic: Open Flash chart in a partial template - how to?
I have been trying to get Open Flash chart to work in my partial template and everything i try just does not work.
Can somebody be kind enough to show a newbie where they are going wrong!
One of the problems is, in my controller I am not using the index action, i am using a separate action called by ajax.
So when my partial loads, the graph is activating the wrong action in the controller so I get this error...
ActiveRecord::RecordNotFound (Couldn't find Event with ID=graph_code):
def graphresults @graph = open_flash_chart_object(600,100,"/events/graph_code") render :partial => "graphresults" , :layout => false end def graph_code title = Title.new("MY TITLE") bar = BarGlass.new bar.set_values([1,2,3,4,5,6,7,8,9]) chart = OpenFlashChart.new chart.set_title(title) chart.add_element(bar) render :text => chart.to_s end
and in my partial view....
Any help would kindly be appreciated