From a430250357c88b8552d87e48e89fd8e783ed2040 Mon Sep 17 00:00:00 2001 From: mbauskar Date: Wed, 17 Aug 2016 18:13:17 +0530 Subject: [PATCH] [minor] allowed to render the charts if only single record is available --- frappe/public/js/frappe/ui/charts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/ui/charts.js b/frappe/public/js/frappe/ui/charts.js index a69d2086ee..5f010fa552 100644 --- a/frappe/public/js/frappe/ui/charts.js +++ b/frappe/public/js/frappe/ui/charts.js @@ -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); }