feat: updated charts to use stacked layout

This commit is contained in:
Shivam Mishra 2020-05-05 18:44:02 +05:30
parent cc7488a90d
commit 5f1240bcc6
2 changed files with 6 additions and 6 deletions

View File

@ -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",

View File

@ -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 }}',
},
]
}