[IMP]fix graph issue when no data.

lp bug: https://launchpad.net/bugs/928123 fixed

bzr revid: vme@tinyerp.com-20120210134858-kq1oxpsikpuc8kxn
This commit is contained in:
Vidhin Mehta (OpenERP) 2012-02-10 19:18:58 +05:30
parent e260cfa286
commit c76a60098b
2 changed files with 1 additions and 2 deletions

View File

@ -647,7 +647,6 @@ dhtmlx.chart.barH = {
if (i.fixNum) n = parseFloat((new Number(n)).toFixed(i.fixNum));
var o = Math.floor(k + l * m) + 0.5;
n != e && j.lines && this.i(a, o, b, o, c.y, this.e.xAxis.color, 0.2);
console.log("111111111111");
this.renderTextAt(false, true, o, b + 2, j.template(n.toString()), "dhx_axis_item_x");
l++
}

View File

@ -183,7 +183,7 @@ openerp.web_graph.GraphView = openerp.web.View.extend({
var self = this;
var group_list,
view_chart = (self.chart == 'line')?'line':(self.chart == 'area')?'area':'';
if (!this.group_field) {
if (!this.group_field || !results.length) {
if (self.chart == 'bar'){
view_chart = (this.orientation === 'horizontal') ? 'barH' : 'bar';
}