    # File lib/fusioncharts_helper.rb, line 57
      def render_chart(chart_swf,str_url,str_xml,chart_id,chart_width,chart_height,debug_mode,register_with_js,&block)
        chart_width=chart_width.to_s
        chart_height=chart_height.to_s

        debug_mode_num="0";
        register_with_js_num="0";

        if debug_mode==true
          debug_mode_num="1"
        end

        if register_with_js==true
          register_with_js_num="1"
        end

        concat("\t\t<!-- START Script Block for Chart "+chart_id+" -->\n\t\t",block.binding)
        concat(content_tag("div","\n\t\t\t\tChart.\n\t\t",{:id=>chart_id+"Div",:align=>"center"}),block.binding)
        concat("\n\t\t<script type='text/javascript'>\n",block.binding)

        concat("\t\t\t\tvar chart_"+chart_id+"=new FusionCharts('"+chart_swf+"','"+chart_id+"',"+chart_width+","+chart_height+","+debug_mode_num+","+register_with_js_num+");\n",block.binding)

        if str_xml==""
          concat("\t\t\t\t<!-- Set the dataURL of the chart -->\n",block.binding)
          concat("\t\t\t\tchart_"+chart_id+".setDataURL(\""+str_url+"\");\n",block.binding)
          logger.info("The method used is setDataURL.The URL is " + str_url)
        else
          concat("\t\t\t\t<!-- Provide entire XML data using DataXML method -->\n",block.binding)
          #concat("\t\t\t\tchart_"+chart_id+".setDataXML(\""+str_xml+"\");\n",block.binding)
          concat("\t\t\t\t",block.binding)
          concat('chart_'+chart_id+'.setDataXML(\''+str_xml+'\');',block.binding)
          concat("\n",block.binding)
          logger.info("The method used is setDataXML.The XML is " + str_xml)
        end

        concat("\t\t\t\t<!-- Finally render the chart. -->\n",block.binding)
        concat("\t\t\t\tchart_"+chart_id+".render('"+chart_id+"Div');\n",block.binding)
        concat("\t\t</script>\n",block.binding)
        concat("\t\t<!-- END Script Block for Chart "+chart_id+" -->\n",block.binding)

      end