diff --git a/teaser/data/output/reports/model_report.py b/teaser/data/output/reports/model_report.py index 21def29f8..0dd16eeb5 100644 --- a/teaser/data/output/reports/model_report.py +++ b/teaser/data/output/reports/model_report.py @@ -183,13 +183,16 @@ def export_reports(bldg_data, bldg_name, path, prj): output_path_base = os.path.join(path, base_name) plotly_file_name = os.path.join(path, "plots", base_name + "_plotly.html") # Draw an abstract image of the building and save it with plotly to HTML - interactive_fig = create_simple_3d_visualization(bldg_data, roof_angle=30) + interactive_fig, fixed_height =\ + create_simple_3d_visualization(bldg_data, roof_angle=30) if interactive_fig: interactive_fig.write_html(plotly_file_name) else: plotly_file_name = None html_file_name = os.path.join(output_path_base + ".html") - create_html_page(bldg_data, prj.name, bldg_name, html_file_name, plotly_file_name) + create_html_page( + bldg_data, prj.name, bldg_name, html_file_name, plotly_file_name, + fixed_height) create_csv_report(bldg_data, output_path_base) @@ -235,7 +238,9 @@ def create_csv_report(bldg_data, output_path_base): ] # round values for key, value in prj_data_flat.items(): - if not isinstance(value, str): + if not value: + value = "-" + elif not isinstance(value, str): prj_data_flat[key] = round(value, 2) else: prj_data_flat[key] = value @@ -312,7 +317,8 @@ def add_compass_to_3d_plot(fig, x_y_axis_sizing): return fig -def create_html_page(bldg_data, prj_name, bldg_name, html_file_name, iframe_src): +def create_html_page(bldg_data, prj_name, bldg_name, html_file_name, + iframe_src, fixed_height): html_content = f""" @@ -459,7 +465,10 @@ def create_html_page(bldg_data, prj_name, bldg_name, html_file_name, iframe_src)