lib/gruff/base.rb
# Draws column labels below graph, centered over x_offset
#--
# TODO Allow WestGravity as an option
Draws column labels below graph, centered over x_offset
TODO Allow WestGravity as an option
Draws column labels below graph centered over x_offset TODO Allow WestGravity as an option
def draw_label(x_offset, index)
      return if @hide_line_markers
      if !@labels[index].nil? && @labels_seen[index].nil?
        y_offset = @graph_bottom + LABEL_MARGIN
        @d.fill = @font_color
        @d.font = @font if @font
        @d.stroke('transparent')
	@d.rotation = @label_rotation
        @d.font_weight = NormalWeight
        @d.pointsize = scale_fontsize(@marker_font_size)
	@d.gravity = @label_rotation == 0 ? NorthGravity : NorthWestGravity
        @d = @d.annotate_scaled(@base_image,
                                1.0, 1.0,
                                x_offset, y_offset,
                                @labels[index], @scale)
	@d.rotation = -@label_rotation
        @labels_seen[index] = 1
        debug { @d.line 0.0, y_offset, @raw_columns, y_offset }
      end
    end
def draw_label ( x_offset , index ) return if @hide_line_markers if ! @labels [ index ] . nil? && @labels_seen [ index ] . nil? y_offset = @graph_bottom + LABEL_MARGIN @d . fill = @font_color @d . font = @font if @font @d . stroke ( 'transparent' ) @d . rotation = @label_rotation @d . font_weight = NormalWeight @d . pointsize = scale_fontsize ( @marker_font_size ) @d . gravity = @label_rotation == 0 ? NorthGravity : NorthWestGravity @d = @d . annotate_scaled ( @base_image , 1.0 , 1.0 , x_offset , y_offset , @labels [ index ] , @scale ) @d . rotation = - @label_rotation @labels_seen [ index ] = 1 debug { @d . line 0.0 , y_offset , @raw_columns , y_offset } end end
Draws column labels below graph, centered over x_offset
TODO Allow WestGravity as an option
Draws column labels below graph centered over x_offset TODO Allow WestGravity as an option
x_offset
<not_specific>
index
<not_specific>