Browse Source

Merge pull request #4524 from pratu16x7/update-charts

Update charts version
version-14
Prateeksha Singh 7 years ago
committed by GitHub
parent
commit
b1e25ee7f4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions
  1. +3
    -2
      frappe/public/js/frappe/form/dashboard.js
  2. +1
    -1
      frappe/public/js/lib/frappe-charts/frappe-charts.min.iife.js
  3. +3
    -4
      frappe/utils/goal.py

+ 3
- 2
frappe/public/js/frappe/form/dashboard.js View File

@@ -339,7 +339,7 @@ frappe.ui.form.Dashboard = Class.extend({
type: 'heatmap', type: 'heatmap',
height: 100, height: 100,
start: new Date(moment().subtract(1, 'year').toDate()), start: new Date(moment().subtract(1, 'year').toDate()),
count_label: frappe.model.scrub(this.frm.doctype) + "s",
count_label: "interactions",
discrete_domains: 0, discrete_domains: 0,
data: {} data: {}
}); });
@@ -409,7 +409,8 @@ frappe.ui.form.Dashboard = Class.extend({
$.extend(args, { $.extend(args, {
parent: '.form-graph', parent: '.form-graph',
type: 'line', type: 'line',
height: 140
height: 140,
colors: ['green']
}); });
this.show(); this.show();




+ 1
- 1
frappe/public/js/lib/frappe-charts/frappe-charts.min.iife.js
File diff suppressed because it is too large
View File


+ 3
- 4
frappe/utils/goal.py View File

@@ -98,7 +98,7 @@ def get_monthly_goal_graph_data(title, doctype, docname, goal_value_field, goal_
summary_values = [ summary_values = [
{ {
'title': _("This month"), 'title': _("This month"),
'color': 'green',
'color': '#ffa00a',
'value': formatted_value 'value': formatted_value
} }
] ]
@@ -114,12 +114,12 @@ def get_monthly_goal_graph_data(title, doctype, docname, goal_value_field, goal_
summary_values += [ summary_values += [
{ {
'title': _("Goal"), 'title': _("Goal"),
'color': 'blue',
'color': '#5e64ff',
'value': formatted_goal 'value': formatted_goal
}, },
{ {
'title': _("Completed"), 'title': _("Completed"),
'color': 'green',
'color': '#28a745',
'value': str(int(round(float(current_month_value)/float(goal)*100))) + "%" 'value': str(int(round(float(current_month_value)/float(goal)*100))) + "%"
} }
] ]
@@ -131,7 +131,6 @@ def get_monthly_goal_graph_data(title, doctype, docname, goal_value_field, goal_
'data': { 'data': {
'datasets': [ 'datasets': [
{ {
'color': 'green',
'values': values, 'values': values,
'formatted': values_formatted 'formatted': values_formatted
} }


Loading…
Cancel
Save