Commit dcd5b28b57cf10001553ca415d862cc731e58f2a
Merge branch 'master' of http://service.routetopa.eu:7480/WebCompDev/COMPONENTS
Showing
1 changed file
with
2 additions
and
2 deletions
datalets/datasetexplorer-datalet/js/buildtreemap2.js
@@ -142,7 +142,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { | @@ -142,7 +142,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { | ||
142 | var data = ["", d.name, d.color, "", "", d.value, ""]; | 142 | var data = ["", d.name, d.color, "", "", d.value, ""]; |
143 | console.log(d); | 143 | console.log(d); |
144 | data[2] = ["#000000"]; | 144 | data[2] = ["#000000"]; |
145 | - var id = d.name.split(':')[1]; | 145 | + var id = (d.name) ? d.name.split(':')[1] : undefined; |
146 | if (d.depth == 1) { | 146 | if (d.depth == 1) { |
147 | // FIRST LVL | 147 | // FIRST LVL |
148 | data[0] = "first"; | 148 | data[0] = "first"; |
@@ -272,7 +272,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { | @@ -272,7 +272,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { | ||
272 | d.each(function(){ | 272 | d.each(function(){ |
273 | var text = d3.select(this), | 273 | var text = d3.select(this), |
274 | d = text[0][0].__data__, | 274 | d = text[0][0].__data__, |
275 | - name = checkProviderName(d.name.trim()); | 275 | + name = (d.name) ? checkProviderName(d.name.trim()) : ""; |
276 | words = name.search(/\s+/) >= 0 ? name.split(/\s+/).reverse() : [name], | 276 | words = name.search(/\s+/) >= 0 ? name.split(/\s+/).reverse() : [name], |
277 | word = words.pop(), | 277 | word = words.pop(), |
278 | line = [word], | 278 | line = [word], |