gruff 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.editorconfig +14 -0
- data/.rubocop.yml +16 -0
- data/.rubocop_todo.yml +923 -0
- data/.travis.yml +21 -14
- data/{History.txt → CHANGELOG.md} +32 -25
- data/README.md +3 -2
- data/Rakefile +27 -18
- data/assets/bubble.png +0 -0
- data/assets/city_scene/background/0000.png +0 -0
- data/assets/city_scene/background/0600.png +0 -0
- data/assets/city_scene/background/2000.png +0 -0
- data/assets/city_scene/clouds/cloudy.png +0 -0
- data/assets/city_scene/clouds/partly_cloudy.png +0 -0
- data/assets/city_scene/clouds/stormy.png +0 -0
- data/assets/city_scene/grass/default.png +0 -0
- data/assets/city_scene/haze/true.png +0 -0
- data/assets/city_scene/number_sample/1.png +0 -0
- data/assets/city_scene/number_sample/2.png +0 -0
- data/assets/city_scene/number_sample/default.png +0 -0
- data/assets/city_scene/sky/0000.png +0 -0
- data/assets/city_scene/sky/0200.png +0 -0
- data/assets/city_scene/sky/0400.png +0 -0
- data/assets/city_scene/sky/0600.png +0 -0
- data/assets/city_scene/sky/0800.png +0 -0
- data/assets/city_scene/sky/1000.png +0 -0
- data/assets/city_scene/sky/1200.png +0 -0
- data/assets/city_scene/sky/1400.png +0 -0
- data/assets/city_scene/sky/1500.png +0 -0
- data/assets/city_scene/sky/1700.png +0 -0
- data/assets/city_scene/sky/2000.png +0 -0
- data/assets/pc306715.jpg +0 -0
- data/assets/plastik/blue.png +0 -0
- data/assets/plastik/green.png +0 -0
- data/assets/plastik/red.png +0 -0
- data/gruff.gemspec +12 -10
- data/lib/gruff.rb +2 -2
- data/lib/gruff/accumulator_bar.rb +2 -2
- data/lib/gruff/area.rb +1 -4
- data/lib/gruff/bar.rb +12 -13
- data/lib/gruff/bar_conversion.rb +11 -11
- data/lib/gruff/base.rb +36 -36
- data/lib/gruff/bezier.rb +1 -2
- data/lib/gruff/bullet.rb +7 -10
- data/lib/gruff/deprecated.rb +10 -11
- data/lib/gruff/dot.rb +3 -4
- data/lib/gruff/line.rb +13 -14
- data/lib/gruff/mini/bar.rb +3 -3
- data/lib/gruff/mini/legend.rb +7 -8
- data/lib/gruff/mini/pie.rb +6 -6
- data/lib/gruff/mini/side_bar.rb +7 -7
- data/lib/gruff/net.rb +2 -8
- data/lib/gruff/photo_bar.rb +9 -12
- data/lib/gruff/pie.rb +6 -6
- data/lib/gruff/scatter.rb +47 -51
- data/lib/gruff/scene.rb +17 -19
- data/lib/gruff/side_bar.rb +5 -8
- data/lib/gruff/side_stacked_bar.rb +24 -26
- data/lib/gruff/spider.rb +14 -15
- data/lib/gruff/stacked_area.rb +12 -16
- data/lib/gruff/stacked_bar.rb +50 -52
- data/lib/gruff/stacked_mixin.rb +2 -3
- data/lib/gruff/themes.rb +32 -33
- data/lib/gruff/version.rb +1 -1
- metadata +23 -67
- data/RELEASE.md +0 -30
- data/test/gruff_test_case.rb +0 -152
- data/test/image_compare.rb +0 -58
- data/test/test_accumulator_bar.rb +0 -51
- data/test/test_area.rb +0 -134
- data/test/test_bar.rb +0 -505
- data/test/test_base.rb +0 -33
- data/test/test_bezier.rb +0 -33
- data/test/test_bullet.rb +0 -26
- data/test/test_dot.rb +0 -263
- data/test/test_labels_for_null_data.rb +0 -27
- data/test/test_legend.rb +0 -68
- data/test/test_line.rb +0 -674
- data/test/test_mini_bar.rb +0 -33
- data/test/test_mini_pie.rb +0 -25
- data/test/test_mini_side_bar.rb +0 -36
- data/test/test_net.rb +0 -231
- data/test/test_photo.rb +0 -41
- data/test/test_pie.rb +0 -194
- data/test/test_scatter.rb +0 -270
- data/test/test_scene.rb +0 -100
- data/test/test_side_bar.rb +0 -56
- data/test/test_sidestacked_bar.rb +0 -105
- data/test/test_spider.rb +0 -226
- data/test/test_stacked_area.rb +0 -52
- data/test/test_stacked_bar.rb +0 -68
@@ -3,24 +3,24 @@ require File.dirname(__FILE__) + '/side_bar'
|
|
3
3
|
require File.dirname(__FILE__) + '/stacked_mixin'
|
4
4
|
|
5
5
|
##
|
6
|
-
# New gruff graph type added to enable sideways stacking bar charts
|
6
|
+
# New gruff graph type added to enable sideways stacking bar charts
|
7
7
|
# (basically looks like a x/y flip of a standard stacking bar chart)
|
8
8
|
#
|
9
|
-
# alun.eyre@googlemail.com
|
9
|
+
# alun.eyre@googlemail.com
|
10
10
|
|
11
11
|
class Gruff::SideStackedBar < Gruff::SideBar
|
12
12
|
include StackedMixin
|
13
13
|
|
14
14
|
# Spacing factor applied between bars
|
15
15
|
attr_accessor :bar_spacing
|
16
|
-
|
16
|
+
|
17
17
|
def draw
|
18
18
|
@has_left_labels = true
|
19
19
|
get_maximum_by_stack
|
20
20
|
super
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
protected
|
24
24
|
|
25
25
|
def draw_bars
|
26
26
|
# Setup spacing.
|
@@ -35,33 +35,32 @@ class Gruff::SideStackedBar < Gruff::SideBar
|
|
35
35
|
padding = (@bar_width * (1 - @bar_spacing)) / 2
|
36
36
|
if @show_labels_for_bar_values
|
37
37
|
label_values = Array.new
|
38
|
-
0.upto(@column_count-1) {|i| label_values[i] = {:
|
38
|
+
0.upto(@column_count - 1) { |i| label_values[i] = { value: 0, right_x: 0 } }
|
39
39
|
end
|
40
40
|
@norm_data.each_with_index do |data_row, row_index|
|
41
41
|
data_row[DATA_VALUES_INDEX].each_with_index do |data_point, point_index|
|
42
|
+
## using the original calcs from the stacked bar chart to get the difference between
|
43
|
+
## part of the bart chart we wish to stack.
|
44
|
+
temp1 = @graph_left + (@graph_width -
|
45
|
+
data_point * @graph_width -
|
46
|
+
height[point_index]) + 1
|
47
|
+
temp2 = @graph_left + @graph_width - height[point_index] - 1
|
48
|
+
difference = temp2 - temp1
|
42
49
|
|
43
|
-
|
44
|
-
## part of the bart chart we wish to stack.
|
45
|
-
temp1 = @graph_left + (@graph_width -
|
46
|
-
data_point * @graph_width -
|
47
|
-
height[point_index]) + 1
|
48
|
-
temp2 = @graph_left + @graph_width - height[point_index] - 1
|
49
|
-
difference = temp2 - temp1
|
50
|
-
|
51
|
-
@d = @d.fill data_row[DATA_COLOR_INDEX]
|
50
|
+
@d = @d.fill data_row[DATA_COLOR_INDEX]
|
52
51
|
|
53
52
|
left_x = length[point_index] #+ 1
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
53
|
+
left_y = @graph_top + (@bar_width * point_index) + padding
|
54
|
+
right_x = left_x + difference
|
55
|
+
right_y = left_y + @bar_width * @bar_spacing
|
56
|
+
length[point_index] += difference
|
58
57
|
height[point_index] += (data_point * @graph_width - 2)
|
59
|
-
|
58
|
+
|
60
59
|
if @show_labels_for_bar_values
|
61
60
|
label_values[point_index][:value] += @norm_data[row_index][3][point_index]
|
62
61
|
label_values[point_index][:right_x] = right_x
|
63
62
|
end
|
64
|
-
|
63
|
+
|
65
64
|
# if a data point is 0 it can result in weird really thing lines
|
66
65
|
# that shouldn't even be there being drawn on top of the existing
|
67
66
|
# bar - this is bad
|
@@ -74,24 +73,23 @@ class Gruff::SideStackedBar < Gruff::SideBar
|
|
74
73
|
label_center = @graph_top + (@bar_width * point_index) + (@bar_width * @bar_spacing / 2.0)
|
75
74
|
draw_label(label_center, point_index)
|
76
75
|
end
|
77
|
-
|
78
76
|
end
|
79
77
|
if @show_labels_for_bar_values
|
80
78
|
label_values.each_with_index do |data, i|
|
81
79
|
val = (@label_formatting || "%.2f") % data[:value]
|
82
|
-
draw_value_label(data[:right_x]+40, (@graph_top + (((i+1) * @bar_width) - (@bar_width / 2)))-12, val.commify, true)
|
80
|
+
draw_value_label(data[:right_x] + 40, (@graph_top + (((i + 1) * @bar_width) - (@bar_width / 2))) - 12, val.commify, true)
|
83
81
|
end
|
84
82
|
end
|
85
|
-
|
86
|
-
@d.draw(@base_image)
|
83
|
+
|
84
|
+
@d.draw(@base_image)
|
87
85
|
end
|
88
86
|
|
89
|
-
def larger_than_max?(data_point, index=0)
|
87
|
+
def larger_than_max?(data_point, index = 0)
|
90
88
|
max(data_point, index) > @maximum_value
|
91
89
|
end
|
92
90
|
|
93
91
|
def max(data_point, index)
|
94
|
-
@data.inject(0) {|sum, item| sum + item[DATA_VALUES_INDEX][index]}
|
92
|
+
@data.inject(0) { |sum, item| sum + item[DATA_VALUES_INDEX][index] }
|
95
93
|
end
|
96
94
|
|
97
95
|
end
|
data/lib/gruff/spider.rb
CHANGED
@@ -1,17 +1,16 @@
|
|
1
|
-
|
2
1
|
require File.dirname(__FILE__) + '/base'
|
3
2
|
|
4
3
|
# Experimental!!! See also the Net graph.
|
5
4
|
#
|
6
5
|
# Submitted by Kevin Clark http://glu.ttono.us/
|
7
6
|
class Gruff::Spider < Gruff::Base
|
8
|
-
|
7
|
+
|
9
8
|
# Hide all text
|
10
9
|
attr_reader :hide_text
|
11
10
|
attr_accessor :hide_axes
|
12
11
|
attr_reader :transparent_background
|
13
12
|
attr_accessor :rotation
|
14
|
-
|
13
|
+
|
15
14
|
def transparent_background=(value)
|
16
15
|
@transparent_background = value
|
17
16
|
@base_image = render_transparent_background if value
|
@@ -27,10 +26,10 @@ class Gruff::Spider < Gruff::Base
|
|
27
26
|
@hide_legend = true
|
28
27
|
@rotation = 0
|
29
28
|
end
|
30
|
-
|
29
|
+
|
31
30
|
def draw
|
32
31
|
@hide_line_markers = true
|
33
|
-
|
32
|
+
|
34
33
|
super
|
35
34
|
|
36
35
|
return unless @has_data
|
@@ -41,11 +40,11 @@ class Gruff::Spider < Gruff::Base
|
|
41
40
|
center_y = @graph_top + (@graph_height / 2.0) - 25 # Move graph up a bit
|
42
41
|
|
43
42
|
@unit_length = radius / @max_value
|
44
|
-
|
45
|
-
additive_angle = (2 * Math::PI)/ @data.size
|
46
|
-
|
43
|
+
|
44
|
+
additive_angle = (2 * Math::PI) / @data.size
|
45
|
+
|
47
46
|
# Draw axes
|
48
|
-
draw_axes(center_x, center_y, radius, additive_angle) unless hide_axes
|
47
|
+
draw_axes(center_x, center_y, radius, additive_angle) unless hide_axes
|
49
48
|
|
50
49
|
# Draw polygon
|
51
50
|
draw_polygon(center_x, center_y, additive_angle)
|
@@ -60,7 +59,7 @@ private
|
|
60
59
|
end
|
61
60
|
|
62
61
|
def draw_label(center_x, center_y, angle, radius, amount)
|
63
|
-
r_offset = 50
|
62
|
+
r_offset = 50 # The distance out from the center of the pie to get point
|
64
63
|
x_offset = center_x # The label points need to be tweaked slightly
|
65
64
|
y_offset = center_y + 0 # This one doesn't though
|
66
65
|
x = x_offset + ((radius + r_offset) * Math.cos(angle))
|
@@ -73,10 +72,10 @@ private
|
|
73
72
|
@d.stroke = 'transparent'
|
74
73
|
@d.font_weight = BoldWeight
|
75
74
|
@d.gravity = CenterGravity
|
76
|
-
@d.annotate_scaled(
|
77
|
-
|
78
|
-
|
79
|
-
|
75
|
+
@d.annotate_scaled(@base_image,
|
76
|
+
0, 0,
|
77
|
+
x, y,
|
78
|
+
amount, @scale)
|
80
79
|
end
|
81
80
|
|
82
81
|
def draw_axes(center_x, center_y, radius, additive_angle, line_color = nil)
|
@@ -119,7 +118,7 @@ private
|
|
119
118
|
end
|
120
119
|
|
121
120
|
def sums_for_spider
|
122
|
-
@data.inject(0.0) {|sum, data_row| sum + data_row[DATA_VALUES_INDEX].first}
|
121
|
+
@data.inject(0.0) { |sum, data_row| sum + data_row[DATA_VALUES_INDEX].first }
|
123
122
|
end
|
124
123
|
|
125
124
|
end
|
data/lib/gruff/stacked_area.rb
CHANGED
@@ -1,11 +1,10 @@
|
|
1
|
-
|
2
1
|
require File.dirname(__FILE__) + '/base'
|
3
2
|
require File.dirname(__FILE__) + '/stacked_mixin'
|
4
3
|
|
5
4
|
class Gruff::StackedArea < Gruff::Base
|
6
5
|
include StackedMixin
|
7
6
|
attr_accessor :last_series_goes_on_bottom
|
8
|
-
|
7
|
+
|
9
8
|
def draw
|
10
9
|
get_maximum_by_stack
|
11
10
|
super
|
@@ -22,7 +21,7 @@ class Gruff::StackedArea < Gruff::Base
|
|
22
21
|
@norm_data.send(iterator) do |data_row|
|
23
22
|
prev_data_points = data_points
|
24
23
|
data_points = Array.new
|
25
|
-
|
24
|
+
|
26
25
|
@d = @d.fill data_row[DATA_COLOR_INDEX]
|
27
26
|
|
28
27
|
data_row[DATA_VALUES_INDEX].each_with_index do |data_point, index|
|
@@ -31,37 +30,34 @@ class Gruff::StackedArea < Gruff::Base
|
|
31
30
|
new_y = @graph_top + (@graph_height - data_point * @graph_height - height[index])
|
32
31
|
|
33
32
|
height[index] += (data_point * @graph_height)
|
34
|
-
|
33
|
+
|
35
34
|
data_points << new_x
|
36
35
|
data_points << new_y
|
37
|
-
|
38
|
-
draw_label(new_x, index)
|
39
36
|
|
37
|
+
draw_label(new_x, index)
|
40
38
|
end
|
41
39
|
|
42
40
|
if prev_data_points
|
43
41
|
poly_points = data_points.dup
|
44
|
-
(prev_data_points.length/2 - 1).downto(0) do |i|
|
45
|
-
poly_points << prev_data_points[2*i]
|
46
|
-
poly_points << prev_data_points[2*i+1]
|
42
|
+
(prev_data_points.length / 2 - 1).downto(0) do |i|
|
43
|
+
poly_points << prev_data_points[2 * i]
|
44
|
+
poly_points << prev_data_points[2 * i + 1]
|
47
45
|
end
|
48
|
-
poly_points << data_points[0]
|
49
|
-
poly_points << data_points[1]
|
46
|
+
poly_points << data_points[0]
|
47
|
+
poly_points << data_points[1]
|
50
48
|
else
|
51
49
|
poly_points = data_points.dup
|
52
50
|
poly_points << @graph_right
|
53
51
|
poly_points << @graph_bottom - 1
|
54
52
|
poly_points << @graph_left
|
55
53
|
poly_points << @graph_bottom - 1
|
56
|
-
poly_points << data_points[0]
|
57
|
-
poly_points << data_points[1]
|
54
|
+
poly_points << data_points[0]
|
55
|
+
poly_points << data_points[1]
|
58
56
|
end
|
59
57
|
@d = @d.polyline(*poly_points)
|
60
|
-
|
61
58
|
end
|
62
59
|
|
63
60
|
@d.draw(@base_image)
|
64
61
|
end
|
65
|
-
|
66
|
-
|
62
|
+
|
67
63
|
end
|
data/lib/gruff/stacked_bar.rb
CHANGED
@@ -1,61 +1,59 @@
|
|
1
|
-
|
2
1
|
require File.dirname(__FILE__) + '/base'
|
3
2
|
require File.dirname(__FILE__) + '/stacked_mixin'
|
4
3
|
|
5
4
|
class Gruff::StackedBar < Gruff::Base
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
@norm_data.each_with_index do |data_row, row_index|
|
33
|
-
data_row[DATA_VALUES_INDEX].each_with_index do |data_point, point_index|
|
34
|
-
@d = @d.fill data_row[DATA_COLOR_INDEX]
|
35
|
-
|
36
|
-
# Calculate center based on bar_width and current row
|
37
|
-
label_center = @graph_left + (@bar_width * point_index) + (@bar_width * @bar_spacing / 2.0)
|
38
|
-
draw_label(label_center, point_index)
|
39
|
-
|
40
|
-
next if (data_point == 0)
|
41
|
-
# Use incremented x and scaled y
|
42
|
-
left_x = @graph_left + (@bar_width * point_index) + padding
|
43
|
-
left_y = @graph_top + (@graph_height -
|
44
|
-
data_point * @graph_height -
|
45
|
-
height[point_index]) + @segment_spacing
|
46
|
-
right_x = left_x + @bar_width * @bar_spacing
|
47
|
-
right_y = @graph_top + @graph_height - height[point_index] - @segment_spacing
|
48
|
-
|
49
|
-
# update the total height of the current stacked bar
|
50
|
-
height[point_index] += (data_point * @graph_height )
|
51
|
-
|
52
|
-
@d = @d.rectangle(left_x, left_y, right_x, right_y)
|
53
|
-
|
54
|
-
end
|
5
|
+
include StackedMixin
|
6
|
+
|
7
|
+
# Spacing factor applied between bars
|
8
|
+
attr_accessor :bar_spacing
|
9
|
+
|
10
|
+
# Number of pixels between bar segments
|
11
|
+
attr_accessor :segment_spacing
|
12
|
+
|
13
|
+
# Draws a bar graph, but multiple sets are stacked on top of each other.
|
14
|
+
def draw
|
15
|
+
get_maximum_by_stack
|
16
|
+
super
|
17
|
+
return unless @has_data
|
18
|
+
|
19
|
+
# Setup spacing.
|
20
|
+
#
|
21
|
+
# Columns sit stacked.
|
22
|
+
@bar_spacing ||= 0.9
|
23
|
+
@segment_spacing ||= 1
|
24
|
+
@bar_width = @graph_width / @column_count.to_f
|
25
|
+
padding = (@bar_width * (1 - @bar_spacing)) / 2
|
26
|
+
|
27
|
+
@d = @d.stroke_opacity 0.0
|
28
|
+
|
29
|
+
height = Array.new(@column_count, 0)
|
55
30
|
|
31
|
+
@norm_data.each_with_index do |data_row, row_index|
|
32
|
+
data_row[DATA_VALUES_INDEX].each_with_index do |data_point, point_index|
|
33
|
+
@d = @d.fill data_row[DATA_COLOR_INDEX]
|
34
|
+
|
35
|
+
# Calculate center based on bar_width and current row
|
36
|
+
label_center = @graph_left + (@bar_width * point_index) + (@bar_width * @bar_spacing / 2.0)
|
37
|
+
draw_label(label_center, point_index)
|
38
|
+
|
39
|
+
next if data_point == 0
|
40
|
+
|
41
|
+
# Use incremented x and scaled y
|
42
|
+
left_x = @graph_left + (@bar_width * point_index) + padding
|
43
|
+
left_y = @graph_top + (@graph_height -
|
44
|
+
data_point * @graph_height -
|
45
|
+
height[point_index]) + @segment_spacing
|
46
|
+
right_x = left_x + @bar_width * @bar_spacing
|
47
|
+
right_y = @graph_top + @graph_height - height[point_index] - @segment_spacing
|
48
|
+
|
49
|
+
# update the total height of the current stacked bar
|
50
|
+
height[point_index] += (data_point * @graph_height)
|
51
|
+
|
52
|
+
@d = @d.rectangle(left_x, left_y, right_x, right_y)
|
56
53
|
end
|
57
|
-
|
58
|
-
@d.draw(@base_image)
|
59
54
|
end
|
60
55
|
|
56
|
+
@d.draw(@base_image)
|
57
|
+
end
|
58
|
+
|
61
59
|
end
|
data/lib/gruff/stacked_mixin.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
module Gruff::Base::StackedMixin
|
3
2
|
# Used by StackedBar and child classes.
|
4
3
|
#
|
@@ -13,9 +12,9 @@ module Gruff::Base::StackedMixin
|
|
13
12
|
max_hash[i] += data_point.to_f
|
14
13
|
end
|
15
14
|
end
|
16
|
-
|
15
|
+
|
17
16
|
# @maximum_value = 0
|
18
|
-
max_hash.
|
17
|
+
max_hash.each_key do |key|
|
19
18
|
@maximum_value = max_hash[key] if max_hash[key] > @maximum_value
|
20
19
|
end
|
21
20
|
@minimum_value = 0
|
data/lib/gruff/themes.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module Gruff
|
2
2
|
module Themes
|
3
|
-
|
3
|
+
|
4
4
|
# A color scheme similar to the popular presentation software.
|
5
5
|
KEYNOTE = {
|
6
|
-
:
|
6
|
+
colors: [
|
7
7
|
'#FDD84E', # yellow
|
8
8
|
'#6886B4', # blue
|
9
9
|
'#72AE6E', # green
|
@@ -12,14 +12,14 @@ module Gruff
|
|
12
12
|
'#EFAA43', # orange
|
13
13
|
'white'
|
14
14
|
],
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
15
|
+
marker_color: 'white',
|
16
|
+
font_color: 'white',
|
17
|
+
background_colors: %w[black #4a465a]
|
18
18
|
}
|
19
19
|
|
20
20
|
# A color scheme plucked from the colors on the popular usability blog.
|
21
21
|
THIRTYSEVEN_SIGNALS = {
|
22
|
-
:
|
22
|
+
colors: [
|
23
23
|
'#FFF804', # yellow
|
24
24
|
'#336699', # blue
|
25
25
|
'#339933', # green
|
@@ -28,15 +28,15 @@ module Gruff
|
|
28
28
|
'#cf5910', # orange
|
29
29
|
'black'
|
30
30
|
],
|
31
|
-
:
|
32
|
-
:
|
33
|
-
:
|
31
|
+
marker_color: 'black',
|
32
|
+
font_color: 'black',
|
33
|
+
background_colors: %w[#d1edf5 white]
|
34
34
|
}
|
35
35
|
|
36
36
|
# A color scheme from the colors used on the 2005 Rails keynote
|
37
37
|
# presentation at RubyConf.
|
38
38
|
RAILS_KEYNOTE = {
|
39
|
-
:
|
39
|
+
colors: [
|
40
40
|
'#00ff00', # green
|
41
41
|
'#333333', # grey
|
42
42
|
'#ff5d00', # orange
|
@@ -45,14 +45,14 @@ module Gruff
|
|
45
45
|
'#999999', # light grey
|
46
46
|
'black'
|
47
47
|
],
|
48
|
-
:
|
49
|
-
:
|
50
|
-
:
|
48
|
+
marker_color: 'white',
|
49
|
+
font_color: 'white',
|
50
|
+
background_colors: %w[#0083a3 #0083a3]
|
51
51
|
}
|
52
52
|
|
53
53
|
# A color scheme similar to that used on the popular podcast site.
|
54
54
|
ODEO = {
|
55
|
-
:
|
55
|
+
colors: [
|
56
56
|
'#202020', # grey
|
57
57
|
'white',
|
58
58
|
'#3a5b87', # dark blue
|
@@ -61,14 +61,14 @@ module Gruff
|
|
61
61
|
'#999999', # light grey
|
62
62
|
'black'
|
63
63
|
],
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:
|
64
|
+
marker_color: 'white',
|
65
|
+
font_color: 'white',
|
66
|
+
background_colors: %w[#ff47a4 #ff1f81]
|
67
67
|
}
|
68
68
|
|
69
69
|
# A pastel theme
|
70
70
|
PASTEL = {
|
71
|
-
:
|
71
|
+
colors: [
|
72
72
|
'#a9dada', # blue
|
73
73
|
'#aedaa9', # green
|
74
74
|
'#daaea9', # peach
|
@@ -77,26 +77,25 @@ module Gruff
|
|
77
77
|
'#daaeda', # purple
|
78
78
|
'#dadada' # grey
|
79
79
|
],
|
80
|
-
:
|
81
|
-
:
|
82
|
-
:
|
80
|
+
marker_color: '#aea9a9', # Grey
|
81
|
+
font_color: 'black',
|
82
|
+
background_colors: 'white'
|
83
83
|
}
|
84
84
|
|
85
85
|
# A greyscale theme
|
86
86
|
GREYSCALE = {
|
87
|
-
:
|
88
|
-
'#282828',
|
89
|
-
'#383838',
|
90
|
-
'#686868',
|
91
|
-
'#989898',
|
92
|
-
'#c8c8c8',
|
93
|
-
'#e8e8e8',
|
87
|
+
colors: [
|
88
|
+
'#282828',
|
89
|
+
'#383838',
|
90
|
+
'#686868',
|
91
|
+
'#989898',
|
92
|
+
'#c8c8c8',
|
93
|
+
'#e8e8e8',
|
94
94
|
],
|
95
|
-
:
|
96
|
-
:
|
97
|
-
:
|
95
|
+
marker_color: '#aea9a9', # Grey
|
96
|
+
font_color: 'black',
|
97
|
+
background_colors: 'white'
|
98
98
|
}
|
99
|
-
|
99
|
+
|
100
100
|
end
|
101
101
|
end
|
102
|
-
|