iBrasten

My methods of calculating time are far superior to yours, in every way.

 

This is the blog of Brasten Sager, a freelance software developer, Mariners fan, guitarist, haphazard philosopher.

Scruffy Docs Updated!

August 17, 2006 @ 06:28 AM

The Scruffy Documentation has been updated to better reflect the current code. It is still a little light on examples, but at least a basic explanation of most things now exists.

Also, previous documentation was missing several code directories. The rake task has been updated to include those files, and documentation added to them.

Thanks to some feedback, I will be adding more examples to the documentation shortly, probably using the examples from my last couple posts here.

6 Responses to “Scruffy Docs Updated!”

  1. This really looks terrific. I'm looking forward to using it. Thank you.

    Tom

  2. Why I got an error when calling render?? c:/ruby/lib/ruby/gems/1.8/gems/scruffy-0.2.1/lib/scruffy/renderers/base.rb:21:in `render': uninitialized constant Scruffy::Renderers::Base::Builder (NameError) from c:/ruby/lib/ruby/gems/1.8/gems/scruffy-0.2.1/lib/scruffy/graph.rb:1 0:in `render' from scruffy_test.rb:16

    Moon

  3. Moon- Apparently I forgot to add a require 'builder' anywhere. For some reason, 90% of the time this has't caused an issue. But it is for you. This will be fixed in 0.2.2, expected later this evening.

    brasten

  4. i had installed the 0.0.2 this morning same problem.

    ./scruffy.rb:1:Warning: require_gem is obsolete. Use gem instead. ./scruffy.rb:4: uninitialized constant Scruffy (NameError) from c:/ruby/lib/ruby/siteruby/1.8/rubygems/customrequire.rb:27:in ge m_original_require’ from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inre quire’ from test_scruffy.rb:2

    here is the test program i am running

    test_scruffy.rb

    require ‘builder’ 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’]

    Stanislav

  5. i had created a test file called scruffy.rb and aparently that was causing a problem. after removing uninitialized constant scruffy error goes away. thanks a lot for your fix this mon.

    never mind my stupid comment

  6. I’m using 0.2.2 but the graph.point_markers doesn’t align. The first value always stay out of line with others. I have tested all the examples in the documentation. Here is my test: 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 =>’gif’, :to => “#{RAILS_ROOT}/public/teste.gif”)

    Thanks

    Rodrigo