Replace c3 (#11112)

* [charts] replace in asset.js

* replace in reports
This commit is contained in:
Prateeksha Singh
2017-10-17 12:03:02 +05:30
committed by Rushabh Mehta
parent 53659cf0bd
commit bfb108d722
10 changed files with 139 additions and 167 deletions

View File

@@ -21,23 +21,13 @@ frappe.query_reports["Minutes to First Response for Opportunity"] = {
get_chart_data: function (columns, result) {
return {
data: {
x: 'Date',
columns: [
['Date'].concat($.map(result, function (d) { return d[0]; })),
['Mins to first response'].concat($.map(result, function (d) { return d[1]; }))
]
// rows: [['Date', 'Mins to first response']].concat(result)
labels: result.map(d => d[0]),
datasets: [{
title: 'Mins to first response',
values: result.map(d => d[1])
}]
},
axis: {
x: {
type: 'timeseries',
tick: {
format: frappe.ui.py_date_format
}
}
},
chart_type: 'line',
type: 'line',
}
}
}