class GoogleChart::VennDiagram

Generates a Venn Diagram.

Supply three vd.data statements of label, size, color for circles A, B, C. Then, intersections with four values:

Public Class Methods

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

Initializes the Venn Diagram with a chart_size (in WIDTHxHEIGHT format) and a chart_title

# File lib/google_chart/venn_diagram.rb, line 20
def initialize(chart_size='300x200', chart_title=nil) # :yield: self
    super(chart_size, chart_title)
    self.chart_type = :v
    @intersections = []
    yield self if block_given? 
end

Public Instance Methods

intersections(*values) click to toggle source

Specify the intersections of the circles in the Venn Diagram. See the Rdoc for class for sample

# File lib/google_chart/venn_diagram.rb, line 32
def intersections(*values)            
  @intersections = values
end
process_data() click to toggle source
# File lib/google_chart/venn_diagram.rb, line 27
def process_data          
  encode_data(@data + @intersections)
end