How to make Html Report readable from all browsers

Hi @jmmease

Essentially I am exporting two offline ploty graphs to html then using both files to create a offline html report.

  • first_url_plot & second_url_plot = two separate offline plotly graphs saved as a offline html file.

So essentially i have 3 html files:
-2 relating to the plotly graph (~4mb)
-1 which is the dashboard(which references the 2 plotly graph)

Problem:

  1. Actually have the graphs in the Dashboard.html file rather than referencing it?(sorry if wrong terms am newb), so the file will be large around 5mb
  2. When i export the dashboard.html file only i can view the file with the plotly plots showing.

Sorry if this is confusing

html_string = '''
<html>
    <head>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
        <style>body{ margin:0 100; background:whitesmoke; }</style>
    </head>
    <body>
        <h1>Navigator Finance</h1>

        <!-- *** Section 1 *** --->
        <h2>Section 1: Oustanding Items - Sundry</h2>
        <iframe width="1000" height="550" frameborder="0" seamless="seamless" scrolling="no" \
src="''' + first_url_plot + '''"></iframe>
        <p>Apple stock price rose steadily through 2014.</p>
        <h3>Reference table: Sundry Changes</h3>
        ''' + summary_table_3 + '''
        
        <!-- *** Section 2 *** --->
        <h2>Section 2: Finance To Journal </h2>
        <iframe width="1000" height="550" frameborder="0" seamless="seamless" scrolling="no" \
src="''' + second_url_plot + '''"></iframe>
        <p>GE had the most predictable stock price in 2014. IBM had the highest mean stock price. \
The red lines are kernel density estimations of each stock price - the peak of each red lines \
corresponds to its mean stock price for 2014 on the x axis.</p>
        <h3>Reference table: FTJ Filenames </h3>
        ''' + summary_table_1 + '''

        <h3>Reference table: Links</h3>
        ''' + summary_table_2 + '''

    </body>
</html>'''

f = open(file_path + "Dashboard" + datetime.strftime(datetime.now(), '_%d_%m_%Y') + ".html" ,'w')
f.write(html_string)
f.close()