use the new frappe charts :D (#11391)
This commit is contained in:
parent
e741b91f1d
commit
6b26e391b8
@ -132,6 +132,7 @@
|
||||
"get_url_arg": true,
|
||||
"get_server_fields": true,
|
||||
"set_multiple": true,
|
||||
"QUnit": true
|
||||
"QUnit": true,
|
||||
"Chart": true
|
||||
}
|
||||
}
|
||||
|
@ -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'
|
||||
}
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user