def extract_export_code_iruby(
      placeholder=random_canvas_id, export_type='png', file_name='chart'
    )
      js = ''
      js << "\n <script>"
      js << "\n (function() {"
      js << "\n \tvar chartDom = document.getElementById('#{placeholder}');"
      js << "\n \tvar chart = Highcharts.charts[Highcharts.attr(chartDom,"
      js << " 'data-highcharts-chart')]"
      js << "\n \tchart.exportChart({"
      js << "\n \t\t" + append_chart_type(export_type)
      js << "\n \t\tfilename: '#{file_name}'"
      js << "\n \t});"
      js << "\n })();"
      js << "\n </script>"
      js
    end
def extract_export_code_iruby(
      placeholder=random_canvas_id, export_type='png', file_name='chart'
    )
      js = ''
      js << "\n <script>"
      js << "\n (function() {"
      js << "\n \tvar chartDom = document.getElementById('#{placeholder}');"
      js << "\n \tvar chart = Highcharts.charts[Highcharts.attr(chartDom,"
      js << " 'data-highcharts-chart')]"
      js << "\n \tchart.exportChart({"
      js << "\n \t\t" + append_chart_type(export_type)
      js << "\n \t\tfilename: '#{file_name}'"
      js << "\n \t});"
      js << "\n })();"
      js << "\n </script>"
      js
    end
Returns the script to export the chart in different formats in
   IRuby notebook

 @param (see #extract_export_code)
 @return [String] the script to export the chart in IRuby notebook