Bläddra i källkod

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 år sedan
committed by Ankush Menat
förälder
incheckning
d049c87690
1 ändrade filer med 6 tillägg och 8 borttagningar
  1. +6
    -8
      frappe/public/js/frappe/views/reports/report_view.js

+ 6
- 8
frappe/public/js/frappe/views/reports/report_view.js Visa fil

@@ -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,
});
},
},
});
}


Laddar…
Avbryt
Spara