Class: OpenFlashChart::Pie

Inherits:
Base
  • Object
show all
Defined in:
lib/plugins/open_flash_chart/lib/open_flash_chart/pie.rb

Instance Method Summary (collapse)

Methods inherited from Base

#<<, #add_element, #append_value, #attach_to_right_y_axis, #method_missing, #render, #set_colours, #set_key, #set_offset, #set_range, #set_tooltip, #to_json2

Constructor Details

- (Pie) initialize(args = {})

Returns a new instance of Pie



46
47
48
49
50
# File 'lib/plugins/open_flash_chart/lib/open_flash_chart/pie.rb', line 46

def initialize args={}
  @type = "pie"
  @colours = []
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OpenFlashChart::Base

Instance Method Details

- (Object) add_animation(animation)



56
57
58
59
60
# File 'lib/plugins/open_flash_chart/lib/open_flash_chart/pie.rb', line 56

def add_animation animation
  @animate ||= []
  @animate << animation
  return self
end

- (Object) on_click(event)



70
71
72
# File 'lib/plugins/open_flash_chart/lib/open_flash_chart/pie.rb', line 70

def on_click(event)
  @on_click = event
end

- (Object) set_animate(bool)



52
53
54
# File 'lib/plugins/open_flash_chart/lib/open_flash_chart/pie.rb', line 52

def set_animate bool
  self.add_animation PieFade.new if bool
end

- (Object) set_gradient_fill



62
63
64
# File 'lib/plugins/open_flash_chart/lib/open_flash_chart/pie.rb', line 62

def set_gradient_fill
  @gradient_fill = true      
end

- (Object) set_no_labels



66
67
68
# File 'lib/plugins/open_flash_chart/lib/open_flash_chart/pie.rb', line 66

def set_no_labels
  @no_labels = true
end