class GoogleChart::PieChart

Attributes

is_3d[RW]

set to true or false to indicate if this is a 3d chart

show_labels[RW]

set to true or false to show or hide pie chart labels

Public Class Methods

new(chart_size='300x200', chart_title=nil, is_3d = false) { |self| ... } click to toggle source

Initializes a Pie Chart object with a chart_size and chart_title. Specify is_3d as true to generate a 3D Pie chart

# File lib/google_chart/pie_chart.rb, line 12
def initialize(chart_size='300x200', chart_title=nil, is_3d = false) # :yield: self
    super(chart_size, chart_title)
    self.is_3d = is_3d
    self.show_legend = false
    self.show_labels = true
    yield self if block_given?
end

Public Instance Methods

is_3d=(value) click to toggle source

Set this value to true if you want the Pie Chart to be rendered as a 3D image

# File lib/google_chart/pie_chart.rb, line 21
def is_3d=(value)
    if value
        self.chart_type = :p3
    else
        self.chart_type = :p
    end
end
process_data() click to toggle source
# File lib/google_chart/pie_chart.rb, line 29
def process_data
    encode_data(@data, max_data_value)
end