def draw
super
return unless @has_data
@x_increment = (@column_count > 1) ? (@graph_width / (@column_count - 1).to_f) : @graph_width
@norm_data.each do |data_row|
data_row[DATA_VALUES_INDEX].each_with_index do |data_point, index|
x_value = data_row[DATA_VALUES_X_INDEX][index]
next if data_point.nil? || x_value.nil?
new_x = get_x_coord(x_value, @graph_width, @graph_left)
new_y = @graph_top + (@graph_height - data_point * @graph_height)
@d = @d.stroke data_row[DATA_COLOR_INDEX]
@d = @d.fill data_row[DATA_COLOR_INDEX]
@d = @d.stroke_opacity 1.0
@d = @d.stroke_width clip_value_if_greater_than(@columns / (@norm_data.first[1].size * 4), 5.0)
circle_radius = clip_value_if_greater_than(@columns / (@norm_data.first[1].size * 2.5), 5.0)
@d = @d.circle(new_x, new_y, new_x - circle_radius, new_y)
end
end
@d.draw(@base_image)
end