gruff 0.20.0 → 0.21.0

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: 9b90bcdac8af078c144bb5828eabf35c548c17c157e536c686809eb6cd7be104
4
- data.tar.gz: '04963819fde8109bf2e351f1572deb50647053296fbc66bf0e166fcd47afca8c'
3
+ metadata.gz: d83fb72593318497b0fe0ff48a98f9f30f7f6c2795b30d1695757ae5d2b808df
4
+ data.tar.gz: 77bf7f31d3339c4a4065dbd47a9ed586f486781641fd59c9fc01b1ff9779e605
5
5
  SHA512:
6
- metadata.gz: 1af7d7ff21c4af8696e6172639cf058d02daf292d5494fbc8fa4cc424d86f1315c089f3995767d7562cf3fe436ae349f1eea440288ba550dab7556f81f75c752
7
- data.tar.gz: c318384a85ae3be86fac9249c31bc36022da9585cafeed119adb0c7e040bd81b7d7cbb3b748c4a992aa82c79e39928de122ef3c69de1208f829d19b5544378ca
6
+ metadata.gz: 4bc158cc912fdc90f795c280e2ae3fab90ffb7d7513b9a6ed3432b4d732b0acbaf8ff52dfd674c2cd30758e0423744002e6bc2fd96bd8db98f2222bfb2224f78
7
+ data.tar.gz: 7a2bcddc07f2225eaac48304de583235818ead0d1664b90818913953b0baff25e410c90bf899ba8866d26605886dbba6e352a8ce6e8e71df615f1d56e7c8c99a
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: ruby
6
6
  authors:
7
7
  - Geoffrey Grosenbach
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  - !ruby/object:Gem::Version
247
247
  version: '0'
248
248
  requirements: []
249
- rubygems_version: 3.2.22
249
+ rubygems_version: 3.4.10
250
250
  signing_key:
251
251
  specification_version: 4
252
252
  summary: Beautiful graphs for one or multiple datasets.