Improve handling of missing data for bars

This commit is contained in:
2017-08-27 18:21:36 +02:00
parent f62e0dc31f
commit 9bda4f0470
2 changed files with 17 additions and 5 deletions

View File

@@ -84,9 +84,16 @@ function buildChart(ctx, bare_data) {
human_time = secondsToHumanReadable(render_time);
}
);
return "Render Time: " + human_time;
},
if (human_time != "") {
return "Render Time: " + human_time;
}
return "";
},
},
filter: function(item, data) {
var data = data.datasets[item.datasetIndex].data[item.index];
return !isNaN(data) && data !== null;
},
footerFontStyle: 'normal'},
}
});
@@ -103,7 +110,11 @@ function buildSpreadsheet(ctx, data) {
for (dataset of data.datasets) {
var row = [dataset.label];
for (value of dataset.data) {
row.push(secondsToHumanReadable(value));
if (value == null) {
row.push("");
} else {
row.push(secondsToHumanReadable(value));
}
}
rows.push(row);
}