1
0
mirror of https://github.com/elisspace/FxLifeSheet.git synced 2026-08-29 15:44:00 +00:00

Add title to moving averages

This commit is contained in:
Felix Krause
2022-05-02 12:02:12 +02:00
parent 73cf9bcfb7
commit 3eba4fe71d
2 changed files with 2 additions and 6 deletions

View File

@@ -130,7 +130,7 @@ function printGraph(key, ctx, numberOfRecentValuesToPrint, additionalValue, skip
var rows = ["week", "month", "quarter", "year", "alltime"];
var c = res.rows[0];
console.log(c);
var finalText = [];
var finalText = ["Moving averages for " + key];
for (var i = 0; i < rows.length; i++) {
finalText.push(roundNumberExactly(c[key + rows[i]], 2) + " - " + rows[i]);
}

View File

@@ -181,12 +181,8 @@ function printGraph(
const rows = ["week", "month", "quarter", "year", "alltime"];
let c = res.rows[0];
console.log(c);
let finalText = [];
let finalText = ["Moving averages for " + key];
for (let i = 0; i < rows.length; i++) {
// let spaces = "";
// for (let j = 0; j < "alltime".length - rows[i].length; j++) {
// spaces += " ";
// }
finalText.push(
roundNumberExactly(c[key + rows[i]], 2) + " - " + rows[i]
);