Charts using rows data

This commit is contained in:
Nabin Hait 2016-05-27 12:20:34 +05:30
parent f57ad0dae4
commit 3a17a69988

View file

@ -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;