# OpenFlash Chart not able to load the flash

**URL:** <https://www.ruby-forum.com/t/openflash-chart-not-able-to-load-the-flash/162236>\
**Category:** Rails\
**Created:** [March 7, 2009, 8:47am UTC](https://www.ruby-forum.com/t/openflash-chart-not-able-to-load-the-flash/162236 "2009-03-07T08:47:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sahil\_D](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@Sahil\_D](https://www.ruby-forum.com/u/Sahil_D)\
**Post date:** [March 7, 2009, 8:47am UTC](https://www.ruby-forum.com/t/openflash-chart-not-able-to-load-the-flash/162236/1 "2009-03-07T08:47:11Z")

</div>

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#  
#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
