Fix #5606 - Percentages on post release report graphs
authorEdward <edward@roojs.com>
Wed, 13 Feb 2019 04:23:16 +0000 (12:23 +0800)
committerEdward <edward@roojs.com>
Wed, 13 Feb 2019 04:23:16 +0000 (12:23 +0800)
g.pie.sector.js

index c0bb4d9..86f20cf 100644 (file)
@@ -112,6 +112,10 @@ Roo = typeof(Roo) != 'undefined' ? Roo:  (imports ? imports.seed.Roo.Roo: {});
             
             var text = (values[i].others) ? opts.others : opts.legend[i] || values[i];
             
+            if(text.indexOf('#qty#') !== -1) {
+                text = text.replace('#qty#', Math.round(values[i]));
+            }
+            
             if(text.indexOf('#%#') !== -1) {
                 text = text.replace('#%#', Math.round(values[i] / total * 100) + '%');
             }