[fix] [minor] downsample data to 1000 points before plotting using flot.downsample plugin

This commit is contained in:
Anand Doshi 2013-08-14 14:22:47 +05:30
parent 0b6fa018d6
commit 9618cb8ef1
3 changed files with 5 additions and 2 deletions

View File

@ -389,7 +389,8 @@ erpnext.GeneralLedger = wn.views.GridReport.extend({
grid: { hoverable: true, clickable: true },
xaxis: { mode: "time",
min: dateutil.str_to_obj(this.from_date).getTime(),
max: dateutil.str_to_obj(this.to_date).getTime() }
max: dateutil.str_to_obj(this.to_date).getTime() },
series: { downsample: { threshold: 1000 } }
}
},
});

View File

@ -176,7 +176,8 @@ erpnext.StockAgeing = erpnext.StockGridReport.extend({
xaxis: {
ticks: $.map(me.data, function(item, idx) { return [[idx+1, item.name]] }),
max: 20
}
},
series: { downsample: { threshold: 1000 } }
}
}
});

View File

@ -235,6 +235,7 @@ erpnext.StockLedger = erpnext.StockGridReport.extend({
min: dateutil.str_to_obj(this.from_date).getTime(),
max: dateutil.str_to_obj(this.to_date).getTime(),
},
series: { downsample: { threshold: 1000 } }
}
},
get_tooltip_text: function(label, x, y) {