From 99ac9d7a15f1a7e5de40c007ff3fbc26e50d5d8e Mon Sep 17 00:00:00 2001 From: erpreciso Date: Wed, 3 Nov 2021 21:35:25 +0100 Subject: [PATCH] Change path to charts in index.html img src in index.html is changed from a full path to filename only, to fix missing display of charts in the output report. --- beangrow/reports.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/beangrow/reports.py b/beangrow/reports.py index d847672..adf1bf8 100755 --- a/beangrow/reports.py +++ b/beangrow/reports.py @@ -355,7 +355,8 @@ def plot_flows(output_dir: str, axs[1].set_title("log(Cash Flows)") fig.autofmt_xdate() fig.tight_layout() - filename = outplots["flows"] = path.join(output_dir, "flows.svg") + filename = path.join(output_dir, "flows.svg") + outplots["flows"] = "flows.svg" plt.savefig(filename) plt.close(fig) @@ -393,7 +394,8 @@ def plot_flows(output_dir: str, ax.legend(["Amortized value from flows", "Market value"], fontsize="xx-small") fig.autofmt_xdate() fig.tight_layout() - filename = outplots["cumvalue"] = path.join(output_dir, "cumvalue.svg") + filename = path.join(output_dir, "cumvalue.svg") + outplots["cumvalue"] = "cumvalue.svg" plt.savefig(filename) plt.close(fig)