Forum: Ruby on Rails OpenFlash Chart not able to load the flash

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sahil D. (Guest)
on 2009-03-07 09:47
(Received via mailing list)
hi guys,

i am trying to create a simple pie chart using open flash chart v2. But
i am
getting this error:

Open Flash Chart
IO ERROR
Loading test data
Error #2032

This is the URL that I tried to open:/deals/graph_code

*my controller code looks like this:*
def index
    @graph = open_flash_chart_object( 600, 300, "/deals/graph_code" )
    @deals = Deal.find(:all)

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @deals }
    end
end

def graph_code
    title = Title.new("Deals")
    pie = Pie.new
    pie.start_angle = 35
    pie.animate = true
    pie.tooltip = '#val# of #total#<br>#percent# of 100%'
    pie.colours = ["#1f013a", "#d01f3c", "#356aa0", "#C79810","#77cb09"]
    pie.values = [34, 67, 22, 12, 98]


    chart = OpenFlashChart.new
    chart.title = title
    chart.add_element(pie)

    chart.x_axis = nil

    render :text => chart.to_s
end

Browser: firefox 3.0.5, i have flash-plugin installed.
Is there something wrong with this code, or its some other issue..?

Regards
--
Sahil
This topic is locked and can not be replied to.