gruff 0.20.0-java → 0.21.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/lib/gruff/base.rb +7 -3
- data/lib/gruff/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d569a4cf8b46975563f111d9c2715da9d77da0216b5fa38d6f6be33f1ff8255c
|
4
|
+
data.tar.gz: b362cc9b3ebf58503cbc898a73e69ce927a559637ebc8cb89977f02221c60211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46afebf1af13fc4b11ed067dcda1556050827c477a4dddf306d2530e264b65bb9e1dc85cc8c28295e810b4a27b38bf682a9a7e803e75720f57a5eb1a374eba25
|
7
|
+
data.tar.gz: 5b6b6e86e9616405b296a2c931a93c276fb773ed24963705c5e078f992eca0bd1074abdad4ee5f42aa1f88513ede0b4c9ce157a17f207a2ae7648dca61e6ef67
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 0.21.0
|
4
|
+
- Fix legend color with empty label (#615)
|
5
|
+
|
3
6
|
## 0.20.0
|
4
7
|
- Fix legend position when blank labels present (#614)
|
5
|
-
- Fixed NoMethodError (undefined method `format
|
8
|
+
- Fixed NoMethodError (undefined method `format=` for Gruff::Line (#612)
|
6
9
|
- Drop Ruby 2.5 support (#611)
|
7
10
|
- Fix deprecation warning for Base#to_blob (#610)
|
8
11
|
|
data/lib/gruff/base.rb
CHANGED
@@ -1035,9 +1035,13 @@ module Gruff
|
|
1035
1035
|
def calculate_legend_label_widths_for_each_line(legend_labels, legend_square_width)
|
1036
1036
|
label_widths = [[]]
|
1037
1037
|
label_lines = [[]]
|
1038
|
-
legend_labels.
|
1039
|
-
|
1040
|
-
|
1038
|
+
legend_labels.each do |label|
|
1039
|
+
if label.empty?
|
1040
|
+
label_width = 0.0
|
1041
|
+
else
|
1042
|
+
width = calculate_width(@legend_font, label)
|
1043
|
+
label_width = width + (legend_square_width * 2.7)
|
1044
|
+
end
|
1041
1045
|
label_widths.last.push label_width
|
1042
1046
|
label_lines.last.push label
|
1043
1047
|
|
data/lib/gruff/version.rb
CHANGED