I’m having some difficult getting Scruffy to render properly. I don’t
seem to have any gem issues, and the example code:
require ‘rubygems’
require ‘scruffy’
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, :to => ‘test.jpg’, :as => ‘JPG’)
runs without error. But test.jpg ends up as a 325 byte file:
test.jpg JPEG 4x2 4x2+0+0 8-bit DirectClass 325b
I’ve tried other Scruffy examples and the same thing happens.
Gruff renders fine, and a simple RMagick example worked as well. I’ve
upgraded my ImageMagick installation, tried the example script with
ruby19 but nothing has worked so far.
Is there something I’m missing here? Is this a known issue? I’m not
really sure where to look next.