feat(chart): Made colors for rising, falling and stagnant rates

This commit is contained in:
Данил 2025-02-19 14:19:18 +03:00
parent e1fdda4b54
commit 77aaddb119

View file

@ -87,7 +87,13 @@ async def create_chart(
) )
plt.plot(newx_2, newy_2) if rate[0] < rate[-1]:
plt.plot(newx_2, newy_2, color='green')
elif rate[0] > rate[-1]:
plt.plot(newx_2, newy_2, color='red', marker='o')
else:
plt.plot(newx_2, newy_2, color='grey')
plt.savefig(f'../charts/{name}.png') plt.savefig(f'../charts/{name}.png')
fig.clear() fig.clear()