Skip to content
Snippets Groups Projects
Commit ff4f39ab authored by Robert Goldmann's avatar Robert Goldmann
Browse files

#674: calculate Math.abs on final average to keep sign

parent ab53e847
No related branches found
No related tags found
No related merge requests found
...@@ -56,7 +56,7 @@ public class DefaultCharts ...@@ -56,7 +56,7 @@ public class DefaultCharts
private static final Chart CHART_AVERAGE_TRANSACTION_AMOUNT_PER_CATEGORY = new Chart("charts.default.averageTransactionAmountPerCategory", private static final Chart CHART_AVERAGE_TRANSACTION_AMOUNT_PER_CATEGORY = new Chart("charts.default.averageTransactionAmountPerCategory",
getChartFromFile("charts/AverageTransactionAmountPerCategoryBar.js"), getChartFromFile("charts/AverageTransactionAmountPerCategoryBar.js"),
ChartType.DEFAULT, 2, ChartDisplayType.BAR, ChartGroupType.NONE, "averageTransactionAmountPerCategory.png"); ChartType.DEFAULT, 3, ChartDisplayType.BAR, ChartGroupType.NONE, "averageTransactionAmountPerCategory.png");
private static final Chart CHART_AVERAGE_INCOMES_AND_EXPENDITURES_PER_YEAR_BAR = new Chart("charts.default.averageIncomesAndExpendituresPerYearBar", private static final Chart CHART_AVERAGE_INCOMES_AND_EXPENDITURES_PER_YEAR_BAR = new Chart("charts.default.averageIncomesAndExpendituresPerYearBar",
getChartFromFile("charts/AverageIncomesAndExpendituresPerYearBar.js"), getChartFromFile("charts/AverageIncomesAndExpendituresPerYearBar.js"),
......
...@@ -31,7 +31,7 @@ for(var i = 0; i < transactionData.length; i++) ...@@ -31,7 +31,7 @@ for(var i = 0; i < transactionData.length; i++)
// add to income or expenditure sum // add to income or expenditure sum
var amount = transaction.amount; var amount = transaction.amount;
values[index].push(Math.abs(amount)); values[index].push(amount);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment