Class: Charts::CircleCountChart
- Inherits:
-
CountChart
- Object
- Chart
- CountChart
- Charts::CircleCountChart
- Defined in:
- lib/charts/count_chart/circle_count_chart.rb
Instance Attribute Summary
Attributes inherited from Chart
#data, #options, #prepared_data, #renderer
Instance Method Summary collapse
Methods inherited from CountChart
#default_options, #draw, #draw_label_text, #draw_labels, #height, #label_count, #offset_x, #offset_y, #outer_item_height, #outer_item_width, #prepare_data, #validate_arguments, #width
Methods inherited from Chart
#create_options_methods, #default_options, #draw, #draw_background, #draw_title, #initialize, #initialize_instance_variables, #post_draw, #pre_draw, #prepare_data, #render, #validate_arguments, #validate_array_and_count
Constructor Details
This class inherits a constructor from Charts::Chart
Instance Method Details
#draw_item(x, y, color) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/charts/count_chart/circle_count_chart.rb', line 2 def draw_item(x, y, color) cx = x + item_width / 2 cy = y + item_height / 2 radius = item_width / 2 renderer.circle cx, cy, radius, fill: color end |