Merge pull request #1988 from mbauskar/develop

[minor] allowed to render the charts if only single record is available
This commit is contained in:
Nabin Hait 2016-08-18 14:23:31 +05:30 committed by GitHub
commit 65e000db67

View file

@ -6,8 +6,8 @@ frappe.ui.Chart = Class.extend({
$.extend(this.opts, opts);
this.show_chart(false);
if(this.opts.data && ((this.opts.data.columns && this.opts.data.columns.length > 1)
|| (this.opts.data.rows && this.opts.data.rows.length > 1))) {
if(this.opts.data && ((this.opts.data.columns && this.opts.data.columns.length >= 1)
|| (this.opts.data.rows && this.opts.data.rows.length >= 1))) {
this.chart = this.render_chart();
this.show_chart(true);
}