Class: PieChart

Inherits:
LineChart show all
Defined in:
lib/object_view/pie_chart.rb

Instance Attribute Summary

Attributes inherited from LineChart

#data

Attributes inherited from ObjectView::Element

#acceptable_children, #children, #single_line, #tag

Instance Method Summary collapse

Methods included from ObjectView

#source, #source=

Methods inherited from ObjectView::Element

#<<, #add, #add_with_tag, #attr, #attributes, #css_class=, #find_element_with_tag, #id=, #is_acceptable_child?, #on_click=, #render, #render_attributes, #render_children, #style, #style=

Constructor Details

#initialize(label) ⇒ PieChart

Returns a new instance of PieChart.



3
4
5
6
7
8
9
10
11
12
# File 'lib/object_view/pie_chart.rb', line 3

def initialize(label)
  super(label)
  
  self.data.chart_type = :pie
  self.data.x_axis_label = "Functional Area"
  self.data.y_axis_labels = ["Defects"]
  add "Loading Chart..."
  self.style = "border: 1px solid black; width: 200px; height: 200px"
  
end