Using Scruffy - problem with point_markers

I’m trying to use the example showed in the scruffy page:

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 :to => “stacking_test.svg”
graph.render :width => 500, :to => “stacking_test.png”, :as =>
‘png’

But I get the error:

C:/Ruby192/lib/ruby/gems/1.9.1/gems/scruffy-0.3.0.beta1/lib/scruffy/components/data_markers.rb:21:in
block in draw': undefined methodfirst’ for “Jan”:String
(NoMethodError)

… related with the line
graph.point_markers = [‘Jan’, ‘Feb’, ‘Mar’, ‘Apr’, ‘May’, ‘Jun’]

Does anybody know what happen and how to solve it?

Thanks in advance.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs