Fixed chart displaying when no much value.
This commit is contained in:
parent
43c4e1f61d
commit
87a66069ad
@ -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 > 1) {
|
||||
// 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 > 1) {
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user