Merge lp:~openerp-dev/openerp-web/trunk-bug-1011492-pan into lp:openerp-web
Proposed by
Jiten (OpenERP)
Status: | Rejected | ||||
---|---|---|---|---|---|
Rejected by: | Nicolas Vanhoren (OpenERP) | ||||
Proposed branch: | lp:~openerp-dev/openerp-web/trunk-bug-1011492-pan | ||||
Merge into: | lp:openerp-web | ||||
Diff against target: |
16 lines (+3/-2) 1 file modified
addons/web_graph/static/src/js/graph.js (+3/-2) |
||||
To merge this branch: | bzr merge lp:~openerp-dev/openerp-web/trunk-bug-1011492-pan | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Xavier (Open ERP) | Pending | ||
Jiten (OpenERP) | Pending | ||
Review via email:
|
This proposal supersedes a proposal from 2012-08-21.
To post a comment you must log in.
Unmerged revisions
- 2885. By Anand
-
[IMP]I have updated the code as suggested
- 2884. By Anand
-
[MERGE]Merged from openerp-web
- 2883. By Anand
-
[FIX]fixes the dashboard problem for the sales and hr graph
- 2882. By Anand
-
[MERGE]Merged from openerp web
- 2881. By Anand
-
[MERGE]Merged from openerp web
- 2880. By Anand
-
[MERGE]mergerd form openerp-web
- 2879. By Anand
-
[MERGE]merged from openerp-web
- 2878. By Anand
-
[MERGE] merged from the openerp-web
- 2877. By Anand
-
[MERGE]merged from openerp-web
- 2876. By Anand
-
[IMP]updated code for sales and hr graph
Looking at that code, it bothers me that the behavior seems arbitrary and lucky, it makes the error disappear but doesn't actually fix it: it's relying on the implementation behavior of min wrt `undefined`, and then relies on the inequality test wrt 0 for the definition of the axis min values.
The way I'd see to do that, _.min returns ``undefined`` if the list of values is empty, instead of pre-testing and returning some arbitrary value use [null, Infinity] as the inner min
var record_min = _.min(record.data, function (item) {
return item[1];
}) || [null, Infinity];
return record_min[1];
this ensures the second member is as big as can be, and will always correctly behave in other mins, and in comparisons with `0`.