mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-23 23:19:20 +00:00
use the new frappe charts :D (#11391)
This commit is contained in:
committed by
Rushabh Mehta
parent
e741b91f1d
commit
6b26e391b8
@@ -132,6 +132,7 @@
|
|||||||
"get_url_arg": true,
|
"get_url_arg": true,
|
||||||
"get_server_fields": true,
|
"get_server_fields": true,
|
||||||
"set_multiple": true,
|
"set_multiple": true,
|
||||||
"QUnit": true
|
"QUnit": true,
|
||||||
|
"Chart": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,14 +309,16 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
rows = []
|
rows = []
|
||||||
for d in data:
|
for d in data:
|
||||||
rows.append(d[self.ageing_col_idx_start : self.ageing_col_idx_start+4])
|
rows.append(
|
||||||
|
{
|
||||||
if rows:
|
'values': d[self.ageing_col_idx_start : self.ageing_col_idx_start+4]
|
||||||
rows.insert(0, [[d.get("label")] for d in ageing_columns])
|
}
|
||||||
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"data": {
|
"data": {
|
||||||
'labels': rows
|
'labels': [d.get("label") for d in ageing_columns],
|
||||||
|
'datasets': rows
|
||||||
},
|
},
|
||||||
"type": 'percentage'
|
"type": 'percentage'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ erpnext.ProductionAnalytics = frappe.views.GridReportWithPlot.extend({
|
|||||||
|
|
||||||
var chart_data = this.get_chart_data ? this.get_chart_data() : null;
|
var chart_data = this.get_chart_data ? this.get_chart_data() : null;
|
||||||
|
|
||||||
this.chart = new frappe.chart.FrappeChart({
|
this.chart = new Chart({
|
||||||
parent: ".chart",
|
parent: ".chart",
|
||||||
data: chart_data,
|
data: chart_data,
|
||||||
type: 'line'
|
type: 'line'
|
||||||
|
|||||||
Reference in New Issue
Block a user