mirror of https://github.com/MISP/misp-dashboard
chg: filter out null value in array
parent
9e657ea415
commit
aca58eb9e7
|
@ -16,14 +16,8 @@
|
|||
fillValue: 0
|
||||
};
|
||||
this.options = $.extend({}, this._default_options, options);
|
||||
//this.result = {
|
||||
// dates: [],
|
||||
//};
|
||||
this.result = {};
|
||||
|
||||
//for (var k in this.mapping) {
|
||||
// this.result[k] = [];
|
||||
//}
|
||||
this.result.dates = [];
|
||||
|
||||
this.mappingDate = {};
|
||||
|
@ -43,6 +37,9 @@
|
|||
}
|
||||
if (this.mapping.labels.length > 0 && this.mapping.values.length > 0) {
|
||||
this.c_values(this.data, this.mapping.labels); // fetch values and overwrite default values
|
||||
for (var k in this.result) {
|
||||
this.result[k] = this.result[k].filter(function(n){ return n != undefined });
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
|
||||
var TreeFromJson = function(container, data, options) {
|
||||
this.container = container;
|
||||
console.log(container.width());
|
||||
this._default_options = {
|
||||
margin: {top: 20, right: 20, bottom: 20, left: 20},
|
||||
width: container.width() > 800 ? container.width()/2 : 800,
|
||||
|
|
Loading…
Reference in New Issue