I am not able to show labels properly for the cases where group values are very close together so the labels tend to overlap. I have tried minAngleForLabel. What else can be done here? The code for the pie chart is:
var types = xf.dimension(function(d) { return d.txntype; });
var typesSum = types.group().reduceSum(function(d) { return d.txnamount; });
var pieChart = dc.pieChart("#pie-row-chart",groupname)
.width(370)
.height(309)
.slicesCap(4)
.innerRadius(70)
.colors(d3.scaleOrdinal(d3.schemeSet1))
.drawPaths(true)
.externalRadiusPadding(60)
.minAngleForLabel(5)
.externalLabels(40)
.dimension(types)
.group(typesSum)
.title(function(d) {
return d.key + ': ' + Math.round((d.value * 100)/100) + ' BDT';
})
.on('pretransition', function(pieChart) {
pieChart.selectAll('text.pie-slice').text(function(d) {
return d.data.key + ' ' + dc.utils.printSingleValue((d.endAngle - d.startAngle) / (2*Math.PI) * 100) + '%';
})
});