show diff in percentage per graph period

This commit is contained in:
2021-01-30 21:56:50 +01:00
parent d6ab891aa7
commit 96520d3128
2 changed files with 7 additions and 5 deletions
+2 -1
View File
@@ -52,7 +52,8 @@ class Calc:
return {"startdate": startRate[0], "startvalue": startRate[1],
"curdate": endRate[0], "curvalue": endRate[1],
"mindate": minRate[0], "minvalue": minRate[1],
"maxdate": maxRate[0], "maxvalue": maxRate[1]}
"maxdate": maxRate[0], "maxvalue": maxRate[1],
"diffPercentage": (Decimal(endRate[1])-Decimal(startRate[1]))/Decimal(startRate[1])*100}
return None