From 3a17a69988fc28cb116a2173a4d52080aa8de898 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 27 May 2016 12:20:34 +0530 Subject: [PATCH] Charts using rows data --- frappe/public/js/frappe/ui/charts.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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;