mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix #2776
This commit is contained in:
3
public/v1/js/ff/accounts/show.js
vendored
3
public/v1/js/ff/accounts/show.js
vendored
@@ -33,7 +33,8 @@ var fixHelper = function (e, tr) {
|
|||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
lineChart(chartUri, 'overview-chart');
|
//lineChart(chartUri, 'overview-chart');
|
||||||
|
lineNoStartZeroChart(chartUri, 'overview-chart');
|
||||||
if (!showAll) {
|
if (!showAll) {
|
||||||
multiCurrencyPieChart(incomeCategoryUri, 'account-cat-in');
|
multiCurrencyPieChart(incomeCategoryUri, 'account-cat-in');
|
||||||
multiCurrencyPieChart(expenseCategoryUri, 'account-cat-out');
|
multiCurrencyPieChart(expenseCategoryUri, 'account-cat-out');
|
||||||
|
16
public/v1/js/ff/charts.js
vendored
16
public/v1/js/ff/charts.js
vendored
@@ -92,6 +92,22 @@ function lineChart(URI, container) {
|
|||||||
drawAChart(URI, container, chartType, options, colorData);
|
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.
|
* Overrules the currency the line chart is drawn in.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user