ソースを参照

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年前
committed by Ankush Menat
コミット
d049c87690
1個のファイルの変更6行の追加8行の削除
  1. +6
    -8
      frappe/public/js/frappe/views/reports/report_view.js

+ 6
- 8
frappe/public/js/frappe/views/reports/report_view.js ファイルの表示

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


読み込み中…
キャンセル
保存