Scruffy > MVC architecture?

Hi,

I am a newby in rails…and i have read that scruffy is a great tool to
create/display images.

Now i find the code below for example…

graph = Scruffy::Graph.new
graph.title = “Comparative Agent Performance”
graph.value_formatter = Scruffy::Formatters::Percentage.new(:precision
=> 0)
graph.add :stacked do |stacked|
stacked.add :bar, ‘Jack’, [30, 60, 49, 29, 100, 120]
stacked.add :bar, ‘Jill’, [120, 240, 0, 100, 140, 20]
stacked.add :bar, ‘Hill’, [10, 10, 90, 20, 40, 10]
end
graph.point_markers = [‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’, ‘Jun’]

graph.render(:width => 800, :as => ‘JPG’)

But how must i place this in the MVC architecture??

Grtz…remco

Hi,

I noticed your post on Google G. (but I couldnt reply to your post
there for some reason). The following example works for me:

send_data(graph.render(:width => 500, :as => ‘PNG’),
:type => “image/png”,
:disposition => ‘inline’)

Hope this helps,
Roel

On Nov 5 2007, 12:13 pm, Remco S. <rails-mailing-l…@andreas-