diff --git a/frappe/public/js/frappe/widgets/chart_widget.js b/frappe/public/js/frappe/widgets/chart_widget.js index 104c457991..47cb947a10 100644 --- a/frappe/public/js/frappe/widgets/chart_widget.js +++ b/frappe/public/js/frappe/widgets/chart_widget.js @@ -573,14 +573,17 @@ export default class ChartWidget extends Widget { xIsSeries: this.chart_doc.timeseries, shortenYAxisNumbers: 1 }, - tooltipOptions: { + }; + + if (this.report_result && this.report_result.chart) { + chart_args.tooltipOptions = { formatTooltipY: value => frappe.format(value, { fieldtype: this.report_result.chart.fieldtype, options: this.report_result.chart.options }, { always_show_decimals: true, inline: true }) } - }; + } if (this.chart_doc.type == "Heatmap") { const heatmap_year = parseInt(this.selected_heatmap_year || this.chart_settings.heatmap_year || this.chart_doc.heatmap_year);