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