diff --git a/frappe/public/js/frappe/ui/charts.js b/frappe/public/js/frappe/ui/charts.js index c205ee97a8..9b194e9346 100644 --- a/frappe/public/js/frappe/ui/charts.js +++ b/frappe/public/js/frappe/ui/charts.js @@ -6,9 +6,10 @@ frappe.ui.Chart = Class.extend({ $.extend(this.opts, opts); this.show_chart(false); - if(this.opts.data.columns.length > 1) { - this.chart = this.render_chart(); - this.show_chart(true); + if((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); } return this.chart;