vendor/gems/ziya-2.1.7/lib/ziya/charts/support/draw.rb
def gen_composites( xml, composite_urls ) 
      composite_urls.keys.sort{ |a,b| a.to_s <=> b.to_s }.each do |chart_id|
        # composite descriptor can either be a string for the comp url or a pair for the swf lib_path and url
        raise "You must specify a hash of options" unless composite_urls[chart_id].is_a? Hash
        opts = composite_urls[chart_id].clone
        url  = opts.delete( :url )
        raise "Unable to find composite chart url" unless url
        path = opts.delete(:path ) || chart_path 
        opts[:url] = gen_composite_path( path, url, chart_id )
        
        self.class.module_eval <<-XML
         xml.image( #{opts_as_string( opts )} )
        XML
        
        # xml.image( opts )
      end
    end
# -------------------------------------------------------------------------
# Generates Draw component for composite charts
Generates Draw component for composite charts
Generates Draw component for composite charts
def gen_composites( xml, composite_urls ) 
      composite_urls.keys.sort{ |a,b| a.to_s <=> b.to_s }.each do |chart_id|
        raise "You must specify a hash of options" unless composite_urls[chart_id].is_a? Hash
        opts = composite_urls[chart_id].clone
        url  = opts.delete( :url )
        raise "Unable to find composite chart url" unless url
        path = opts.delete(:path ) || chart_path 
        opts[:url] = gen_composite_path( path, url, chart_id )
        self.class.module_eval <<-XML
         xml.image( #{opts_as_string( opts )} )
        XML
      end
    end
def gen_composites ( xml , composite_urls ) composite_urls . keys . sort { | a , b | a . to_s <=> b . to_s } . each do | chart_id | raise "You must specify a hash of options" unless composite_urls [ chart_id ] . is_a? Hash opts = composite_urls [ chart_id ] . clone url = opts . delete ( :url ) raise "Unable to find composite chart url" unless url path = opts . delete ( :path ) || chart_path opts [ :url ] = gen_composite_path ( path , url , chart_id ) self . class . module_eval <<-XML 
         xml.image(  #{ opts_as_string ( opts ) }  )
         XML end end
Generates Draw component for composite charts
Generates Draw component for composite charts
# composite descriptor can either be a string for the comp url or a pair for the swf lib_path and url # xml.image( opts )
xml
composite_urls