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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0470a845dea66723f512a991696cefcec76110bc625720c9de2e06b248968dfb
4
- data.tar.gz: d6d93d5ac547d1b588e8b936b8faf1bdbdd86b1f6b05859c62569dcc2096ddf0
3
+ metadata.gz: d569a4cf8b46975563f111d9c2715da9d77da0216b5fa38d6f6be33f1ff8255c
4
+ data.tar.gz: b362cc9b3ebf58503cbc898a73e69ce927a559637ebc8cb89977f02221c60211
5
5
  SHA512:
6
- metadata.gz: d57209f9c7dc7d3739feea9d1d1cfb41afd85db57d3723a768c17f37413f689becaabba7a119f33a97ed7e4fab7a4906c8a334a8d230cee537fa164d62cd3f01
7
- data.tar.gz: 697e7f71c16e5c8d5351144b5cd9fff0bef80a7d9f2dee100dd5e6f90daf712ca041cf8acd581830de8763b697a9c8b66b7b3ddd51df7cd40ece16fac0bc37f7
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=' for Gruff::Line (#612)
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.reject(&:empty?).each do |label|
1039
- width = calculate_width(@legend_font, label)
1040
- label_width = width + (legend_square_width * 2.7)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gruff
4
- VERSION = '0.20.0'
4
+ VERSION = '0.21.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gruff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.0
4
+ version: 0.21.0
5
5
  platform: java
6
6
  authors:
7
7
  - Geoffrey Grosenbach