diff -r 04e728651a48 -r 0a2c2ad49d75 cms/app-client/app/components/visu-langues.js --- a/cms/app-client/app/components/visu-langues.js Thu Oct 13 13:01:12 2016 +0200 +++ b/cms/app-client/app/components/visu-langues.js Fri Oct 14 01:02:10 2016 +0200 @@ -76,6 +76,8 @@ d._children = d.children; if(d.children) { d.value = d.children.reduce(function(p, v) { return p + accumulate(v); }, 0); + } else if (d.values) { + d.value = d.values.reduce(function(p, v) { return p + (languages[v] ? languages[v] : 0); }, 0); } else { d.value = languages[d.id] ? languages[d.id] : 0; } @@ -89,10 +91,14 @@ function getCount(node, count = 0) { var c = languages[node.id]; if(typeof c === 'undefined') { - node._children.forEach(function(child) { - count = getCount(child, count); - }); - return count; + if(node._children) { + node._children.forEach(function(child) { + count = getCount(child, count); + }); + } else if(node.values) { + count = node.values.reduce(function(p, v) { return p + (languages[v] ? languages[v] : 0); }, count); + } + return count; } else { return count + c; }