makePieChart:function(data,diameter){varvalues=data.pluck('value');data.forEach(function(ea){ea.normalizedValue=ea.value/pv.sum(values)})diameter=diameter||100;varlabelOffset=-40,outerLabelOffset=200,borderWidth=Math.max(0,labelOffset)+outerLabelOffset,center=diameter/2+borderWidth;varcolorFromNormalizedValue=pv.Scale.linear(pv.min(pv.normalize(values))-0.2,pv.max(pv.normalize(values))+0.1).range("white","black");varvis=newpv.Panel().width(diameter+borderWidth*2).height(diameter+borderWidth*2);varwedge=vis.add(pv.Wedge).data(data).angle(function(d){returnd.normalizedValue*2*Math.PI}).fillStyle(function(d){returncolorFromNormalizedValue(d.normalizedValue)}).left(center).bottom(center).outerRadius(diameter/2)wedge.add(pv.Label).text(function(d){returnString(d.normalizedValue.toFixed(2)*100)+'%\n'}).left(function(){return(labelOffset+diameter/2)*Math.cos(wedge.midAngle())+center}).bottom(function(){return-1*(labelOffset+diameter/2)*Math.sin(wedge.midAngle())+center}).textAlign("center").textBaseline("middle").textAngle(0)//.textDecoration('bold').font('20pxVerdana').textStyle('white')vis.add(pv.Dot).data(data).size(100).left(function(d){returncenter-50}).bottom(function(d){returncenter-diameter/2-20-this.index*30}).strokeStyle("none").fillStyle(function(d){returncolorFromNormalizedValue(d.normalizedValue)}).anchor("right").add(pv.Label).text(function(d){returnd.description}).font('20pxVerdana').textStyle('black')returnvis},
8nulltruetrue2000000