diff --git a/src/html/js/entries.js b/src/html/js/entries.js index 8beff86..51a215d 100644 --- a/src/html/js/entries.js +++ b/src/html/js/entries.js @@ -483,10 +483,11 @@ var ListViewModel = function() { drawChart = function(data, element) { // Clear previous chart $(element).html(""); + element.style.height="0px"; var entries = data.entries; - if(entries && entries.length > 0) { + if(entries && entries.length > 2) { // Prepare for today vertical line. var today = new Date(); today.setHours(0); @@ -583,8 +584,9 @@ drawChart = function(data, element) { drawPieChart = function(entries, element) { // Clear previous chart $(element).html(""); + element.style.height="0px"; - if(entries && entries.length > 0) { + if(entries && entries.length > 2) { // Plot chart, and store it in a window parameter for resize callback (need to be done better than it...) window.pieChart = $.jqplot(element.id, [entries], { // Title of the chart