# Open flash chart and ajax

**URL:** <https://www.ruby-forum.com/t/open-flash-chart-and-ajax/166042>\
**Category:** Rails\
**Created:** [April 21, 2009, 9:07am UTC](https://www.ruby-forum.com/t/open-flash-chart-and-ajax/166042 "2009-04-21T09:07:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sijo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sijo](https://www.ruby-forum.com/u/sijo)\
**Post date:** [April 21, 2009, 9:07am UTC](https://www.ruby-forum.com/t/open-flash-chart-and-ajax/166042/1 "2009-04-21T09:07:54Z")

</div>

Hi  
I want to refresh a graph For that what should I do.The following is  
an example from the site  
My controller code like

def dashboard  
@graph =  
open\_flash\_chart\_object(600,300,"#{request\_summary\_graph\_path}", true)  
end

def draw\_summary\_graph  
g = Graph.new  
g.title( ‘Users vs. Ram - 24h statistics’, ‘{color: #7E97A6;  
font-size: 20; }’ )  
g.set\_data([289,198,143,126,98,96,124,164,213,238,256,263,265,294,291,289])  
etc etc…  
render :text =\> g.render

end

and my view (dashboard.html.erb ) like

| \<%= link\_to\_remote 'Refresh', {:url =\> request\_summary\_graph\_path}, :update =\> "test\_div\_this" %\> |
| 
 \<%= @graph %\> 
 |

```
     What i am trying to do when clicking on Refresh link the

```

portion inside div “test\_div”  
refreshed But this does not happen Please help

Thanks in advance  
Sijo
