lib/gruff/net.rb
# the lines connecting in the center, with the first line vertical
the lines connecting in the center, with the first line vertical
the lines connecting in the center with the first line vertical
def draw_line_markers
    return if @hide_line_markers
    (0..column_count - 1).each do |index|
      rad_pos = index * Math::PI * 2 / column_count
      Gruff::Renderer::Line.new(renderer, color: @marker_color)
                           .render(@center_x, @center_y, @center_x + Math.sin(rad_pos) * @radius, @center_y - Math.cos(rad_pos) * @radius)
      marker_label = @labels[index] ? @labels[index].to_s : '000'
      draw_label(@center_x, @center_y, rad_pos * 360 / (2 * Math::PI), @radius + @circle_radius, marker_label)
    end
  end
def draw_line_markers return if @hide_line_markers ( 0 .. column_count - 1 ) . each do | index | rad_pos = index * Math :: PI * 2 / column_count Gruff :: Renderer :: Line . new ( renderer , color : @marker_color ) . render ( @center_x , @center_y , @center_x + Math . sin ( rad_pos ) * @radius , @center_y - Math . cos ( rad_pos ) * @radius ) marker_label = @labels [ index ] ? @labels [ index ] . to_s : '000' draw_label ( @center_x , @center_y , rad_pos * 360 / ( 2 * Math :: PI ) , @radius + @circle_radius , marker_label ) end end
the lines connecting in the center, with the first line vertical
the lines connecting in the center with the first line vertical
# Draw horizontal line markers and annotate with numbers