Hi Guys,
This tip will teach you how to draw an outer Ring to donut/pie chat in petnaho CDE.
Source for this tip :
http://jsfiddle.net/duarteleao/wBzGD/
Purpose : To make your pie or doughnut chart more attractive.
Arg = slice_add
Value = write below function with out comments(ignore comments)
function() {
var pctBorderOffsetRadius = 0.01; // <== Configure this >= 0 or < 0!
return new pv.Dot()
.localProperty('layoutInfo')
.data(function(scene){ return [scene]; })
.layoutInfo(function() {
return this.getContext().panel._layoutInfo;
})
.zOrder(-10) // below pie slices
.bottom(function(){ return this.layoutInfo().center.y; })
.left (function(){ return this.layoutInfo().center.x; })
.shapeRadius(function(){
var li = this.layoutInfo();
var borderOffsetRadius = pctBorderOffsetRadius * li.clientRadius;
var maxPieOffsetRadius = li.explodedOffsetRadius + li.activeOffsetRadius;
var borderRadius = li.normalRadius +
maxPieOffsetRadius +
borderOffsetRadius;
return this.getContext().chart.animate(10, borderRadius);
})
.fillStyle(null)
.strokeStyle('blue')
.lineWidth(1.5);
}
}
Sample output:
Thank you.
This tip will teach you how to draw an outer Ring to donut/pie chat in petnaho CDE.
Source for this tip :
http://jsfiddle.net/duarteleao/wBzGD/
Purpose : To make your pie or doughnut chart more attractive.
Arg = slice_add
Value = write below function with out comments(ignore comments)
function() {
var pctBorderOffsetRadius = 0.01; // <== Configure this >= 0 or < 0!
return new pv.Dot()
.localProperty('layoutInfo')
.data(function(scene){ return [scene]; })
.layoutInfo(function() {
return this.getContext().panel._layoutInfo;
})
.zOrder(-10) // below pie slices
.bottom(function(){ return this.layoutInfo().center.y; })
.left (function(){ return this.layoutInfo().center.x; })
.shapeRadius(function(){
var li = this.layoutInfo();
var borderOffsetRadius = pctBorderOffsetRadius * li.clientRadius;
var maxPieOffsetRadius = li.explodedOffsetRadius + li.activeOffsetRadius;
var borderRadius = li.normalRadius +
maxPieOffsetRadius +
borderOffsetRadius;
return this.getContext().chart.animate(10, borderRadius);
})
.fillStyle(null)
.strokeStyle('blue')
.lineWidth(1.5);
}
}
Sample output:
Thank you.
No comments:
Post a Comment