cms/app-client/app/components/discourses-component.js
changeset 267 a2872152f568
parent 266 0e1880fa7bd3
child 278 f2c2c80a49f7
equal deleted inserted replaced
266:0e1880fa7bd3 267:a2872152f568
    21             var sum = array.reduce(function(a, b) { return a + b; });
    21             var sum = array.reduce(function(a, b) { return a + b; });
    22             var average = sum / array.length;
    22             var average = sum / array.length;
    23             var newMin = Math.floor((average - oldMin)), newMax = Math.floor((oldMax - average));
    23             var newMin = Math.floor((average - oldMin)), newMax = Math.floor((oldMax - average));
    24 
    24 
    25             var width = self.$().parent().width();
    25             var width = self.$().parent().width();
    26             var height = self.$().parent().height() - self.$().siblings().height();
    26             var height = self.$().parent().height() - self.$().siblings().outerHeight(true);
    27 
    27 
    28             var bubble = d3.layout.pack()
    28             var bubble = d3.layout.pack()
    29                 .sort(function comparator(a, b) { return a.value + b.value; })
    29                 .sort(function comparator(a, b) { return a.value + b.value; })
    30                 .size([width, height])
    30                 .size([width, height])
    31                 .value(function(d){
    31                 .value(function(d){