From 5f1240bcc66d1873dc4e84c09df2e449f4033627 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 5 May 2020 18:44:02 +0530 Subject: [PATCH] feat: updated charts to use stacked layout --- .../projects/report/project_summary/project_summary.py | 10 +++++----- erpnext/setup/setup_wizard/data/dashboard_charts.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/erpnext/projects/report/project_summary/project_summary.py b/erpnext/projects/report/project_summary/project_summary.py index 81e63cf70d..7f534bf524 100644 --- a/erpnext/projects/report/project_summary/project_summary.py +++ b/erpnext/projects/report/project_summary/project_summary.py @@ -90,10 +90,6 @@ def get_chart_data(data): "data": { 'labels': labels, 'datasets': [ - { - "name": "Total Tasks", - "values": total - }, { "name": "Completed", "values": completed @@ -101,7 +97,11 @@ def get_chart_data(data): { "name": "Overdue", "values": overdue - } + }, + { + "name": "Total Tasks", + "values": total + }, ] }, "type": "bar", diff --git a/erpnext/setup/setup_wizard/data/dashboard_charts.py b/erpnext/setup/setup_wizard/data/dashboard_charts.py index 7edd5e3d4a..ccb23c07e8 100644 --- a/erpnext/setup/setup_wizard/data/dashboard_charts.py +++ b/erpnext/setup/setup_wizard/data/dashboard_charts.py @@ -124,7 +124,7 @@ def get_default_dashboards(): 'is_public': 1, 'filters_json': json.dumps({"company": company.name, "status": "Open"}), 'type': 'Bar', - 'custom_options': '{"type": "bar", "colors": ["#7679fc", "#98d85b", "#fc4f51"], "axisOptions": {"shortenYAxisNumbers": 1}, "tooltipOptions": {}}', + 'custom_options': '{"type": "bar", "colors": ["#98d85b", "#fc4f51", "#7679fc"], "axisOptions": { "shortenYAxisNumbers": 1}, "barOptions": { "stacked": 1 }}', }, ] }