Bugs: Browse | Submit New | Admin

[#9109] y_axis_increment doesn't work with Line graphs

Date:
2007-03-07 11:07
Priority:
3
Submitted By:
Nobody
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
y_axis_increment doesn't work with Line graphs

Detailed description
Using  y_axis_increment with a line graph gives:

 ArgumentError in StatsController#graph_outings_test

wrong number of arguments (1 for 0)

RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace

#{RAILS_ROOT}/lib/gruff/base.rb:581:in `normalize'
#{RAILS_ROOT}/lib/gruff/base.rb:581:in `draw_line_markers'
#{RAILS_ROOT}/lib/gruff/base.rb:434:in `setup_drawing'
#{RAILS_ROOT}/lib/gruff/base.rb:404:in `draw'
#{RAILS_ROOT}/lib/gruff/line.rb:38:in `draw'
#{RAILS_ROOT}/lib/gruff/base.rb:391:in `to_blob'
#{RAILS_ROOT}/app/controllers/stats_controller.rb:59:in `graph_outings_test'

The code for graph_outings_test is:

    g = Gruff::Line.new(500)

    g.y_axis_increment = 1
    g.title = "Uscite per spot" 

    g.data("Outings", [5,2,2,3])
    g.data("Outings2", [1,4,6,8])
    g.minimum_value = 0


    send_data(g.to_blob, 
	      :disposition => 'inline', 
	      :type => 'image/png', 
	      :filename => "outings_per_spot.png")


I changed the file line.rb from:

  def normalize()


into 

  def normalize(force=false)

and now it works.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2008-03-27 21:13
Sender: Laurel Fan

I submitted at patch to fix this:

http://rubyforge.org/tracker/index.php?func=detail&aid=19141&
amp;group_id=1044&atid=4083
Date: 2007-12-07 16:20
Sender: iain broadfoot

bump, this is annoying, especially since the exception doesn't
explicitly point out that the method without the parameter is
in a subclass...

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item