Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -310,7 +310,8 @@ def create_dual_bar_chart(tasks, bar_width, task_colors, common_x_range, font_pr
|
|
310 |
|
311 |
# Customize legend with selected position
|
312 |
ax.legend(fontsize=font_properties['legend_size'], loc=legend_loc_map[legend_position])
|
313 |
-
|
|
|
314 |
plt.tight_layout()
|
315 |
return fig
|
316 |
|
@@ -371,6 +372,9 @@ def plot_timeline_chart(tasks, bar_width, font_properties, progress_text_positio
|
|
371 |
# Add legend with selected position
|
372 |
if show_milestones or show_today_line:
|
373 |
ax.legend(loc=legend_loc_map[legend_position], fontsize=font_properties['legend_size'], frameon=True)
|
|
|
|
|
|
|
374 |
|
375 |
plt.tight_layout()
|
376 |
return fig
|
@@ -512,9 +516,13 @@ def create_dual_donut_chart(tasks, font_properties,
|
|
512 |
ax.axis('equal') # Keep the pie chart circular
|
513 |
ax.text(0, 0, "Project Progress", fontsize=font_properties['title_size'],
|
514 |
fontname='Times New Roman', ha='center')
|
|
|
|
|
515 |
|
516 |
plt.tight_layout()
|
517 |
return fig
|
|
|
|
|
518 |
# Function to create an interactive gantt chart with plotly
|
519 |
def create_gantt_chart(tasks):
|
520 |
df = []
|
|
|
310 |
|
311 |
# Customize legend with selected position
|
312 |
ax.legend(fontsize=font_properties['legend_size'], loc=legend_loc_map[legend_position])
|
313 |
+
# Add just before returning the figure in this function
|
314 |
+
ax.legend(loc=legend_loc_map[legend_position], bbox_to_anchor=legend_bbox_map[legend_position])
|
315 |
plt.tight_layout()
|
316 |
return fig
|
317 |
|
|
|
372 |
# Add legend with selected position
|
373 |
if show_milestones or show_today_line:
|
374 |
ax.legend(loc=legend_loc_map[legend_position], fontsize=font_properties['legend_size'], frameon=True)
|
375 |
+
|
376 |
+
# Add just before returning the figure in this function
|
377 |
+
ax.legend(loc=legend_loc_map[legend_position], bbox_to_anchor=legend_bbox_map[legend_position])
|
378 |
|
379 |
plt.tight_layout()
|
380 |
return fig
|
|
|
516 |
ax.axis('equal') # Keep the pie chart circular
|
517 |
ax.text(0, 0, "Project Progress", fontsize=font_properties['title_size'],
|
518 |
fontname='Times New Roman', ha='center')
|
519 |
+
# Add this right before the return fig statement
|
520 |
+
ax.legend(loc=legend_loc_map[legend_position], bbox_to_anchor=legend_bbox_map[legend_position])
|
521 |
|
522 |
plt.tight_layout()
|
523 |
return fig
|
524 |
+
|
525 |
+
|
526 |
# Function to create an interactive gantt chart with plotly
|
527 |
def create_gantt_chart(tasks):
|
528 |
df = []
|