use the new frappe charts :D (#11391)

This commit is contained in:
Prateeksha Singh 2017-10-31 12:58:48 +05:30 committed by Rushabh Mehta
parent e741b91f1d
commit 6b26e391b8
3 changed files with 10 additions and 7 deletions

View File

@ -132,6 +132,7 @@
"get_url_arg": true,
"get_server_fields": true,
"set_multiple": true,
"QUnit": true
"QUnit": true,
"Chart": true
}
}

View File

@ -309,14 +309,16 @@ class ReceivablePayableReport(object):
rows = []
for d in data:
rows.append(d[self.ageing_col_idx_start : self.ageing_col_idx_start+4])
if rows:
rows.insert(0, [[d.get("label")] for d in ageing_columns])
rows.append(
{
'values': d[self.ageing_col_idx_start : self.ageing_col_idx_start+4]
}
)
return {
"data": {
'labels': rows
'labels': [d.get("label") for d in ageing_columns],
'datasets': rows
},
"type": 'percentage'
}

View File

@ -64,7 +64,7 @@ erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({
var chart_data = this.get_chart_data ? this.get_chart_data() : null;
this.chart = new frappe.chart.FrappeChart({
this.chart = new Chart({
parent: ".chart",
data: chart_data,
type: 'line'