# Showing graphs on browser with gruff lib

**URL:** <https://www.ruby-forum.com/t/showing-graphs-on-browser-with-gruff-lib/180631>\
**Category:** Rails\
**Created:** [December 24, 2009, 7:43am UTC](https://www.ruby-forum.com/t/showing-graphs-on-browser-with-gruff-lib/180631 "2009-12-24T07:43:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [December 24, 2009, 7:43am UTC](https://www.ruby-forum.com/t/showing-graphs-on-browser-with-gruff-lib/180631/1 "2009-12-24T07:43:57Z")

</div>

Hi,  
I am using “gruff” lib for creating the graphs.  
I have got the success to create the graph, but my problem is I don’t  
want to store it, I want that they should be displyed on the browser it  
self.  
I have tried this:-  
"  
send\_data(g.to\_blob, :disposition =\> ‘inline’, :type =\> ‘image/png’,  
:filename =\> “arbitaryfilename.png”) "

By using this it just shows that graph.

I want to show the 5 graphs a a time.  
Like:- as objects  
I am going to create an object of the grohpa created and on vie I am  
going to iterate that and show it one by one.  
Can anyone tell me how should Iacehive this?

Thanks,  
Tushar

---

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [December 24, 2009, 4:46pm UTC](https://www.ruby-forum.com/t/showing-graphs-on-browser-with-gruff-lib/180631/2 "2009-12-24T16:46:30Z")

</div>

Tushar G. wrote:

> Hi,  
> I am using “gruff” lib for creating the graphs.  
> I have got the success to create the graph, but my problem is I don’t  
> want to store it, I want that they should be displyed on the browser it  
> self.  
> I have tried this:-  
> "  
> send\_data(g.to\_blob, :disposition =\> ‘inline’, :type =\> ‘image/png’,  
> :filename =\> “arbitaryfilename.png”) "
> 
> By using this it just shows that graph.
> 
> I want to show the 5 graphs a a time.  
> Like:- as objects  
> I am going to create an object of the grohpa created and on vie I am  
> going to iterate that and show it one by one.  
> Can anyone tell me how should Iacehive this?

Use ![]() tags in an HTML file.

> Thanks,  
> Tushar

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
