Commit 042eeb13afd861023e28a241d7e818fa8b5c188b

Authored by Renato De Donato
1 parent ef51505a

treemap ckan bugs fixed

datalets/datasetexplorer-datalet/js/buildtreemap2.js
@@ -50,7 +50,6 @@ function build2(root, meta, place_holder, select_listener, width, height) { @@ -50,7 +50,6 @@ function build2(root, meta, place_holder, select_listener, width, height) {
50 var data = ["top", "", "#000000", "", "", "", ""]; 50 var data = ["top", "", "#000000", "", "", "", ""];
51 //data[3] = OW.getLanguageText('ode', 'back'); 51 //data[3] = OW.getLanguageText('ode', 'back');
52 data[3] = datasetexplorer_ln["ode+back_"+datasetexplorer_ln["ln"]]; 52 data[3] = datasetexplorer_ln["ode+back_"+datasetexplorer_ln["ln"]];
53 - console.log(data[3]);  
54 53
55 return "showTooltip(evt, '" + data + "')"; 54 return "showTooltip(evt, '" + data + "')";
56 }) 55 })
@@ -80,7 +79,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { @@ -80,7 +79,7 @@ function build2(root, meta, place_holder, select_listener, width, height) {
80 // the children being overwritten when when layout is computed. 79 // the children being overwritten when when layout is computed.
81 function accumulate(d) { 80 function accumulate(d) {
82 return (d._children = d.children) 81 return (d._children = d.children)
83 - ? d.value = d.children.reduce(function(p, v) { return p + accumulate(v); }, 5) 82 + ? d.value = d.children.reduce(function(p, v) { return p + accumulate(v); }, 0)
84 : d.value; 83 : d.value;
85 } 84 }
86 85
@@ -141,6 +140,7 @@ function build2(root, meta, place_holder, select_listener, width, height) { @@ -141,6 +140,7 @@ function build2(root, meta, place_holder, select_listener, width, height) {
141 .attr("onmousemove", function(d) { 140 .attr("onmousemove", function(d) {
142 //var data = ["lvl", "name", "color", "description", "logoUrl", "datasets", "datasetUrl"]; 141 //var data = ["lvl", "name", "color", "description", "logoUrl", "datasets", "datasetUrl"];
143 var data = ["", d.name, d.color, "", "", d.value, ""]; 142 var data = ["", d.name, d.color, "", "", d.value, ""];
  143 + console.log(d);
144 data[2] = ["#000000"]; 144 data[2] = ["#000000"];
145 var id = d.name.split(':')[1]; 145 var id = d.name.split(':')[1];
146 if (d.depth == 1) { 146 if (d.depth == 1) {