Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix #2776
James Cole7431e18e4bc7
diff --git a/public/v1/js/ff/accounts/show.js b/public/v1/js/ff/accounts/show.jsindex 46dcf06be8..0ae59c2815 100644--- a/public/v1/js/ff/accounts/show.js+++ b/public/v1/js/ff/accounts/show.js@@ -33,7 +33,8 @@ var fixHelper = function (e, tr) {$(function () {"use strict";- lineChart(chartUri, 'overview-chart');+ //lineChart(chartUri, 'overview-chart');+ lineNoStartZeroChart(chartUri, 'overview-chart');if (!showAll) {multiCurrencyPieChart(incomeCategoryUri, 'account-cat-in');multiCurrencyPieChart(expenseCategoryUri, 'account-cat-out');diff --git a/public/v1/js/ff/charts.js b/public/v1/js/ff/charts.jsindex 958c91f447..9061fab523 100644--- a/public/v1/js/ff/charts.js+++ b/public/v1/js/ff/charts.js@@ -92,6 +92,22 @@ function lineChart(URI, container) {drawAChart(URI, container, chartType, options, colorData);}+/**+ * Function to draw a line chart that doesn't start at ZERO.+ * @param URI+ * @param container+ */+function lineNoStartZeroChart(URI, container) {+ "use strict";++ var colorData = true;+ var options = $.extend(true, {}, defaultChartOptions);+ var chartType = 'line';+ options.scales.yAxes[0].ticks.beginAtZero = false;++ drawAChart(URI, container, chartType, options, colorData);+}+/*** Overrules the currency the line chart is drawn in.*