this.setLocation = function()

in packages/issue-dashboard-widgets/widgets/distribution-reports/app/nv-flex-pie-chart.js [138:189]


          this.setLocation = function(d, group) {
            if (labelSunbeamLayout) {
              d.outerRadius = arcRadius + 10; // Set Outer Coordinate
              d.innerRadius = arcRadius + 15; // Set Inner Coordinate
              var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
              if ((d.startAngle + d.endAngle) / 2 < Math.PI) {
                rotateAngle -= 90;
              } else {
                rotateAngle += 90;
              }
              group.transition().attr('transform', 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')');
            } else {
              d.outerRadius = radius + 10; // Set Outer Coordinate
              d.innerRadius = radius + 15; // Set Inner Coordinate

              if (d.value) {
                hideLabels = hideLabels || ((d.endAngle - d.startAngle) < labelThreshold);
                if (hideLabels) {
                  group.attr('opacity', 0.0);
                } else {
                  var center = labelsArc.centroid(d);
                  var sector = utils.getSector(d);
                  if (labelLocationHash[hashKey] && sector > 6.0 && sector < 6.3 && labelLocationHash[hashKey].sector < 6.0 && labelLocationHash[hashKey].sector > 5.7) {
                    center[1] = Math.max(labelLocationHash[hashKey].center[1], center[1]);
                  }
                  hashKey = createHashKeyY(center);
                  if (labelLocationHash[hashKey] && checkOverlapping(center, labelLocationHash[hashKey].center) && (sector > 6.0) == (labelLocationHash[hashKey].sector > 6.0)) {
                    if (sector > 6.0 && labelLocationHash[hashKey].sector < sector) {
                      center[1] = labelLocationHash[hashKey].center[1] - avgHeight;
                    } else {
                      center[1] = labelLocationHash[hashKey].center[1] + avgHeight;
                    }
                    makeLabelInsideVisibleArea(center);
                    hashKey = createHashKeyY(center);
                    if (hashKey in labelLocationHash && checkOverlapping(center, labelLocationHash[hashKey].center)) {
                      group.attr('opacity', 0.0);
                      hideLabels = true;
                    }
                  }
                  if (!hideLabels) {
                    makeLabelInsideVisibleArea(center);
                    group.transition().attr('transform', 'translate(' + center + ')');
                    group.attr('opacity', 1.0);
                    labelLocationHash[hashKey] = {
                      sector: sector,
                      center: center
                    };
                  }
                }
              }
            }
          };