def draw_js_spreadsheet(data, element_id)
      js = ''
      js << "\n function #{chart_function_name(element_id)}() {"
      js << "\n   var query = new google.visualization.Query('#{data}');"
      js << "\n   query.send(#{query_response_function_name(element_id)});"
      js << "\n }"
      js << "\n function #{query_response_function_name(element_id)}(response) {"
      js << "\n   var data_table = response.getDataTable();"
      js << "\n   var table = new google.visualization.Table"\
            "(document.getElementById('#{element_id}'));"
      js << add_listeners_js('table')
      js << "\n 	table.draw(data_table, #{js_parameters(@options)});"
      js << "\n };"
      js
    end
def draw_js_spreadsheet(data, element_id)
      js = ''
      js << "\n function #{chart_function_name(element_id)}() {"
      js << "\n   var query = new google.visualization.Query('#{data}');"
      js << "\n   query.send(#{query_response_function_name(element_id)});"
      js << "\n }"
      js << "\n function #{query_response_function_name(element_id)}(response) {"
      js << "\n   var data_table = response.getDataTable();"
      js << "\n   var table = new google.visualization.Table"\
            "(document.getElementById('#{element_id}'));"
      js << add_listeners_js('table')
      js << "\n 	table.draw(data_table, #{js_parameters(@options)});"
      js << "\n };"
      js
    end
Generates JavaScript function for rendering the google chart table when
   data is URL of the google spreadsheet

 @param (see #to_js_full_script_spreadsheet)
 @return [String] JS function to render the google chart table when data
   is URL of the google spreadsheet