fix: add missing chart types and don't make type mandatory

This commit is contained in:
prssanna 2020-05-16 15:09:24 +05:30
parent d47eb90984
commit d5e16b3edb
2 changed files with 4 additions and 11 deletions

View file

@ -92,12 +92,6 @@ frappe.ui.form.on('Dashboard Chart', {
}
});
} else {
if (frm.doc.chart_type == 'Group By') {
frm.set_df_property('type', 'options', ['Line', 'Bar', 'Percentage', 'Pie', 'Donut']);
} else {
frm.set_df_property('type', 'options', ['Line', 'Bar', 'Heatmap']);
}
frm.set_value('document_type', '');
}
},

View file

@ -128,8 +128,7 @@
"fieldname": "type",
"fieldtype": "Select",
"label": "Type",
"options": "Line\nBar\nHeatmap",
"reqd": 1
"options": "Line\nBar\nPercentage\nPie\nDonut\nHeatmap"
},
{
"fieldname": "column_break_2",
@ -219,7 +218,7 @@
"options": "Dashboard Chart Field"
},
{
"description": "Ex: \"colors\": [\"#d1d8dd\", \"#ff5858\"] (the options set here will override the chart options set in the Dashboard)",
"description": "Ex: \"colors\": [\"#d1d8dd\", \"#ff5858\"]",
"fieldname": "custom_options",
"fieldtype": "Code",
"label": "Custom Options"
@ -239,7 +238,7 @@
}
],
"links": [],
"modified": "2020-05-01 19:45:01.669384",
"modified": "2020-05-16 15:03:02.455395",
"modified_by": "Administrator",
"module": "Desk",
"name": "Dashboard Chart",
@ -283,4 +282,4 @@
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}
}