Hi

installed scruffy...and put the code below in my controller.

 def show_img
    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, 'remco', [30, 60, 49, 29, 100, 120]
      stacked.add :bar, 'peter', [120, 240, 0, 100, 140, 20]
      stacked.add :bar, 'femmie', [10, 10, 90, 20, 40, 10]
    end

    graph.point_markers = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun']

    send_data(graph.render(:width => 800, :as => 'PNG'), :type =>
'image/png', :disposition=> 'inline')
  end


In the view a placed...

 <img src="<%= url_for(:action => 'show_img') %>"/>

But with no succes..

In the generated HTML i get

 <img src="/users/show_img"/>


What i am doing wrong???

remco
-- 
Posted via http://www.ruby-forum.com/.