~openerp-dev/openerp-web/7.0-opw-589823-msh

« back to all changes in this revision

Viewing changes to addons/web_graph/static/src/js/graph.js

  • Committer: Xavier Morel
  • Date: 2013-06-10 07:11:51 UTC
  • mfrom: (3724.1.1 7.0)
  • Revision ID: xmo@openerp.com-20130610071151-15lhz4o95tl4clak
[FIX] display 'undefined' in case of falsy graph value rather than empty label

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
openerp.web_graph = function (instance) {
6
6
 
7
7
var _lt = instance.web._lt;
 
8
var _t = instance.web._t;
8
9
 
9
10
// removed ``undefined`` values
10
11
var filter_values = function (o) {
365
366
        }).then(function() {
366
367
            var res = {
367
368
                'data': result,
368
 
                'ticks': _.map(ticks, function(el, key) { return [el, key] })
 
369
                'ticks': _.map(ticks, function(el, key) { return [el, key || _t("Undefined")] })
369
370
            };
370
371
            return res;
371
372
        }));