Pentaho Tools :

Pentaho C-Tools(CDE,CDF,CDA),Pentaho CE & EE Server,OLAP-Cubes,Analysis using Pivot4J, Saiku Analytics, Saiku Reporting, Ad-hoc Reporting using Interactive Reporting Tool,Dashboards,Reports using PRD, PDD,Data Integration using Kettle ETL,Data Mining usign WEKA,Integration of Servers with Databases,Mobile/iPad compatible Dashboards using Bootstrap Css,Drilldown dashboards,Interactive Dashboards

Tuesday, 29 July 2014

Outer Ring to Pie/Doughnut chart in pentaho CDE - Tip from CCC-Master Leao.

Hi Guys,

This tip will teach you how to draw an outer Ring to donut/pie chat in petnaho CDE.

Source for this tip :

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()
               .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; })
                   var li = this.layoutInfo();
                   var borderOffsetRadius = pctBorderOffsetRadius * li.clientRadius;
                   var maxPieOffsetRadius = li.explodedOffsetRadius + li.activeOffsetRadius;
                   var borderRadius = li.normalRadius + 
                                       maxPieOffsetRadius + 
                   return this.getContext().chart.animate(10, borderRadius);

Sample output:

Thank you.