Skip to content

Firefly III: a personal finances manager

Can now inform about the lack of certain charts [skip ci]

James Colefc0024faa295
diff --git a/public/js/ff/charts.js b/public/js/ff/charts.js
index 7180a9c131..de470ba9e4 100644
--- a/public/js/ff/charts.js
+++ b/public/js/ff/charts.js
@@ -180,7 +180,6 @@ function doubleYNonStackedChart(URI, container) {
}
-
/**
*
* @param URI
@@ -253,11 +252,17 @@ function drawAChart(URI, container, chartType, options, colorData) {
console.log(chartType + " chart in " + container + " has no data.");
// remove the chart container + parent
var holder = $('#' + container).parent().parent();
- if (holder.hasClass('box')) {
+ if (holder.hasClass('box') || holder.hasClass('box-body')) {
// find box-body:
- var boxBody = holder.find('.box-body');
+ var boxBody;
+ if (!holder.hasClass('box-body')) {
+ boxBody = holder.find('.box-body');
+ } else {
+ boxBody = holder;
+ }
boxBody.empty().append($('<p>').append($('<em>').text(noDataForChart)));
- //holder.remove();
+ } else {
+ console.log("Want to add text but holder has classes: " + holder.attr("class"));
}
return;
}