Fix Legend Overlap

This commit is contained in:
madeofstown
2025-02-17 15:29:28 -08:00
parent f20ca4a88e
commit ab1f1a71ea
+5 -1
View File
@@ -638,6 +638,10 @@ async def graph_telemetry(node_id, payload_type, graph_config):
if 'palette' in ax_config:
args['palette'] = ax_config['palette']
sns.lineplot(data=ax_df, ax=ax, **args)
if i:
sns.move_legend(ax, "upper right")
else:
sns.move_legend(ax, "upper left")
png = io.BytesIO()
plt.savefig(png, dpi=100)
@@ -662,7 +666,7 @@ async def graph_power(request):
{
'label': 'voltage',
'fields': ['voltage'],
'palette': 'Set2',
'palette': 'Set2'
},
],
)