lib/gruff/base.rb
# Return a formatted string representing a number value that should be
# printed as a label.
Return a formatted string representing a number value that should be
printed as a label.
Return a formatted string representing a number value that should be printed as a label .
def label(value)
      if (@spread.to_f % @marker_count.to_f == 0) || !@y_axis_increment.nil?
        return value.to_i.to_s
      end
      if @spread > 10.0
        sprintf("%0i", value)
      elsif @spread >= 3.0
        sprintf("%0.2f", value)
      else
        value.to_s
      end
    end
def label ( value ) if ( @spread . to_f % @marker_count . to_f == 0 ) || ! @y_axis_increment . nil? return value . to_i . to_s end if @spread > 10.0 sprintf ( "%0i" , value ) elsif @spread >= 3.0 sprintf ( "%0.2f" , value ) else value . to_s end end
Return a formatted string representing a number value that should be
printed as a label.
Return a formatted string representing a number value that should be printed as a label .
value
<not_specific>