projects
/
selectricity
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Added the Gruff library to the lib/ directory of the the rails folder, and the
[selectricity]
/
lib
/
gruff-0.2.8
/
lib
/
gruff
/
mini
/
bar.rb
1
##
2
#
3
# Makes a small bar graph suitable for display at 200px or even smaller.
4
#
5
module Gruff
6
module Mini
7
8
class Bar < Gruff::Bar
9
10
include Gruff::Mini::Legend
11
12
def draw
13
@hide_legend = true
14
@hide_title = true
15
@hide_line_numbers = true
16
17
@marker_font_size = 50.0
18
@minimum_value = 0.0
19
@legend_font_size = 60.0
20
21
expand_canvas_for_vertical_legend
22
23
super
24
25
draw_vertical_legend
26
@d.draw(@base_image)
27
end
28
29
end
30
31
end
32
end
Benjamin Mako Hill
||
Want to submit a patch?