Merge pull request #14169 from pratu16x7/hotfix

[hotfix][charts] update, without new build system
This commit is contained in:
Prateeksha Singh 2018-05-21 18:31:39 +05:30 committed by GitHub
commit bcbe32ce7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 7 deletions

View File

@ -64,8 +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 Chart({ this.chart = new frappeChart.Chart(".chart", {
parent: ".chart",
data: chart_data, data: chart_data,
type: 'line' type: 'line'
}); });

View File

@ -266,7 +266,6 @@ class Project(Document):
task_doc.append('depends_on', {"task": dt_name}) task_doc.append('depends_on', {"task": dt_name})
task_doc.save() task_doc.save()
@frappe.whitelist()
def get_timeline_data(doctype, name): def get_timeline_data(doctype, name):
'''Return timeline for attendance''' '''Return timeline for attendance'''
return dict(frappe.db.sql('''select unix_timestamp(from_time), count(*) return dict(frappe.db.sql('''select unix_timestamp(from_time), count(*)

View File

@ -4,7 +4,6 @@ def get_data():
return { return {
'heatmap': True, 'heatmap': True,
'heatmap_message': _('This is based on the Time Sheets created against this project'), 'heatmap_message': _('This is based on the Time Sheets created against this project'),
'method' : 'erpnext.projects.doctype.project.project.get_timeline_data',
'fieldname': 'project', 'fieldname': 'project',
'transactions': [ 'transactions': [
{ {

View File

@ -146,7 +146,6 @@ frappe.Leaderboard = Class.extend({
me.$graph_area.show().empty(); me.$graph_area.show().empty();
let args = { let args = {
parent: '.leaderboard-graph',
data: { data: {
datasets: [ datasets: [
{ {
@ -160,7 +159,7 @@ frappe.Leaderboard = Class.extend({
type: 'bar', type: 'bar',
height: 140 height: 140
}; };
new Chart(args); new frappeChart.Chart('.leaderboard-graph', args);
notify(me, r, $container); notify(me, r, $container);
} }