@@ -283,14 +283,14 @@ def _generate_plot_content(self, plot, is_report_static, static_dir: str = STATI
283283 elif plot .plot_type == r .PlotType .PLOTLY :
284284 plot_content .append (self ._generate_plot_code (plot ))
285285 if is_report_static :
286- plot_content .append (f"""fig_plotly.write_image("{ os .path .join ( ".." , static_plot_path )} ")\n ```\n """ )
286+ plot_content .append (f"""fig_plotly.write_image("{ os .path .abspath ( static_plot_path )} ")\n ```\n """ )
287287 plot_content .append (self ._generate_image_content (static_plot_path ))
288288 else :
289289 plot_content .append (f"""fig_plotly.show()\n ```\n """ )
290290 elif plot .plot_type == r .PlotType .ALTAIR :
291291 plot_content .append (self ._generate_plot_code (plot ))
292292 if is_report_static :
293- plot_content .append (f"""fig_altair.save("{ os .path .join ( ".." , static_plot_path )} ")\n ```\n """ )
293+ plot_content .append (f"""fig_altair.save("{ os .path .abspath ( static_plot_path )} ")\n ```\n """ )
294294 plot_content .append (self ._generate_image_content (static_plot_path ))
295295 else :
296296 plot_content .append (f"""fig_altair\n ```\n """ )
@@ -537,7 +537,7 @@ def _show_dataframe(self, dataframe, is_report_static, static_dir: str = STATIC_
537537 if is_report_static :
538538 # Generate path for the DataFrame image
539539 df_image = os .path .join (static_dir , f"{ dataframe .title .replace (' ' , '_' )} .png" )
540- dataframe_content .append (f"dfi.export(df, '{ os .path .join ( '..' , df_image )} ', max_rows=10, max_cols=5)\n ```\n " )
540+ dataframe_content .append (f"dfi.export(df, '{ os .path .abspath ( df_image )} ', max_rows=10, max_cols=5)\n ```\n " )
541541 # Use helper method to add centered image content
542542 dataframe_content .append (self ._generate_image_content (df_image ))
543543 else :
0 commit comments