Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bar label values no longer affected by hide/show label marker boolean

  • Loading branch information...
commit ab8359d327af703c851d3e816395bbf906be69be 1 parent e7dd9b6
@BRIMIL01 BRIMIL01 authored BRIMIL01 committed
Showing with 3 additions and 3 deletions.
  1. +1 −1  lib/gruff/bar.rb
  2. +2 −2 lib/gruff/base.rb
View
2  lib/gruff/bar.rb
@@ -93,7 +93,7 @@ def draw_bars
draw_label(label_center - (@center_labels_over_point ? @bar_width / 2.0 : 0.0), point_index)
if @show_labels_for_bar_values
val = (@label_formatting || "%.2f") % @norm_data[row_index][3][point_index]
- draw_value_label(left_x + (right_x - left_x)/2, conv[0]-30, val.commify)
+ draw_value_label(left_x + (right_x - left_x)/2, conv[0]-30, val.commify, true)
end
end
View
4 lib/gruff/base.rb
@@ -826,8 +826,8 @@ def draw_label(x_offset, index)
end
# Draws the data value over the data point in bar graphs
- def draw_value_label(x_offset, y_offset, data_point)
- return if @hide_line_markers
+ def draw_value_label(x_offset, y_offset, data_point, bar_value=false)
+ return if @hide_line_markers && !bar_value
#y_offset = @graph_bottom + LABEL_MARGIN
Please sign in to comment.
Something went wrong with that request. Please try again.