fix: Format values by passing fieldtype

- Pass fieldtype to format value
This commit is contained in:
Suraj Shetty 2019-07-09 18:13:15 +05:30
parent 0b0bbff3ab
commit 2cde97402c

View file

@ -493,6 +493,15 @@ frappe.views.QueryReport = class QueryReport extends frappe.views.BaseList {
if (!(options && options.data && options.data.labels && options.data.labels.length > 0)) return;
if (options.fieldtype) {
options.tooltipOptions = {
formatTooltipY: d => frappe.format(d, {
fieldtype: options.fieldtype,
options: options.options
})
};
}
return options;
}