Class: GoogleChart::PieChart
Constant Summary
Constants inherited from Base
Base::BASE_URL, Base::COMPLEX_ENCODING_ALPHABET, Base::SIMPLE_ENCODING
Instance Attribute Summary collapse
-
#is_3d ⇒ Object
Returns the value of attribute is_3d.
Attributes inherited from Base
#chart_size, #chart_title, #chart_type, #data_encoding, #params, #show_labels, #show_legend
Instance Method Summary collapse
-
#initialize(chart_size = '300x200', chart_title = nil, is_3d = false) ⇒ PieChart
constructor
Initializes a Pie Chart object with a
chart_sizeandchart_title. - #process_data ⇒ Object
Methods inherited from Base
#axis, #data, #fill, #grid, #to_url
Constructor Details
#initialize(chart_size = '300x200', chart_title = nil, is_3d = false) ⇒ PieChart
Initializes a Pie Chart object with a chart_size and chart_title. Specify is_3d as true to generate a 3D Pie chart
8 9 10 11 12 13 |
# File 'lib/google_chart/pie_chart.rb', line 8 def initialize(chart_size='300x200', chart_title=nil, is_3d = false) super(chart_size, chart_title) self.is_3d = is_3d self.show_labels = true self.show_legend = false end |
Instance Attribute Details
#is_3d ⇒ Object
Returns the value of attribute is_3d.
5 6 7 |
# File 'lib/google_chart/pie_chart.rb', line 5 def is_3d @is_3d end |
Instance Method Details
#process_data ⇒ Object
24 25 26 |
# File 'lib/google_chart/pie_chart.rb', line 24 def process_data encode_data(@data) end |