Vaibhav (OpenERP) has proposed merging
lp:~openerp-dev/openerp-web/trunk-graph-fixes into lp:openerp-web.
Requested reviews:
OpenERP R&D Web Team (openerp-dev-web)
For more details, see:
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-graph-fixes/+merge/93150
Graph issues.
1)Pie:
Undefined Container element for Pie. ex: CRM Dashboard
2) String Operation ex. Lowercase on `boolean` value. ex: Opportunities Analysis
--
https://code.launchpad.net/~openerp-dev/openerp-web/trunk-graph-fixes/+merge/93150
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openerp-web/trunk-graph-fixes.
=== modified file 'addons/web_graph/static/src/js/graph.js'
--- addons/web_graph/static/src/js/graph.js 2012-02-10 13:48:58 +0000
+++ addons/web_graph/static/src/js/graph.js 2012-02-15 07:25:25 +0000
@@ -216,9 +216,11 @@
.pluck(this.group_field)
.uniq()
.map(function (value, index) {
+ if(value)
+ value = value.toLowerCase().replace(/[\s\/]+/g,'_')
return {
group: self.ordinate + '_' +
- value.toLowerCase().replace(/[\s\/]+/g,'_'),
+ value,
text: value,
color: COLOR_PALETTE[index % COLOR_PALETTE.length]
};
@@ -231,9 +233,11 @@
// second argument is coerced to a str, no good for boolean
r[self.abscissa] = records[0][self.abscissa];
_(records).each(function (record) {
+ if(record[self.group_field])
+ record[self.group_field] = record[self.group_field].toLowerCase().replace(/[\s\/]+/g,'_')
var key = _.str.sprintf('%s_%s',
self.ordinate,
- record[self.group_field].toLowerCase().replace(/[\s\/]+/g,'_'));
+ record[self.group_field]);
r[key] = record[self.ordinate];
});
return r;
@@ -349,7 +353,7 @@
self.renderer = null;
var chart = new dhtmlXChart({
view:"pie3D",
- container:self.element_id+"-piechart",
+ container:self.widget_parent.element_id+"-piechart",
value:"#"+self.ordinate+"#",
pieInnerText:function(obj) {
var sum = chart.sum("#"+self.ordinate+"#");
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp