Sfoglia il codice sorgente

fix: dont pass doc to tooltip formatter on reportview

This just doesn't exist. Also filtering doc by value makes no sense,
it's bound to be incorrect or misleading.

(cherry picked from commit 679e846707)
version-14
Ankush Menat 2 anni fa
committed by Ankush Menat
parent
commit
d049c87690
1 ha cambiato i file con 6 aggiunte e 8 eliminazioni
  1. +6
    -8
      frappe/public/js/frappe/views/reports/report_view.js

+ 6
- 8
frappe/public/js/frappe/views/reports/report_view.js Vedi File

@@ -536,7 +536,6 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
this.last_chart_type = args.chart_type;

const get_df = (field) => this.columns_map[field].docfield;
const get_doc = (value, field) => this.data.find((d) => d[field] === value);

this.$charts_wrapper.removeClass("hidden");

@@ -551,13 +550,12 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
numberFormatter: frappe.utils.format_chart_axis_number,
},
tooltipOptions: {
formatTooltipY: (value) =>
frappe.format(
value,
get_df(this.chart_args.y_axes[0]),
{ always_show_decimals: true, inline: true },
get_doc(value.doc)
),
formatTooltipY: (value) => {
return frappe.format(value, get_df(this.chart_args.y_axes[0]), {
always_show_decimals: true,
inline: true,
});
},
},
});
}


Caricamento…
Annulla
Salva