I created dashboard Machine Monitoring
with reports
and then i render whole dashboard on a page but now in that dashboard there are filters in each chart when I set filters need to add those details on that charts widget subtitle so that can visible
Simply i need to override frappe/public/js/frappe/widgets/chart_widgets.js
frappe V15
custom_chart_widget.js
frappe.provide("frappe.widget.utils");
frappe.provide("frappe.dashboards");
frappe.provide("frappe.dashboards.chart_sources");
frappe.provide("frappe.widgets.chart_widget");
frappe.widgets.ChartWidget = class CustomChartWidget extends frappe.widgets.ChartWidget{
render_chart() {
// Your custom logic for rendering the chart
console.log("Custom chart rendering logic here!");
super.render_chart(); // Call the original method if needed
}
refreshMe() {
console.log("refreshing from here");
// const chartWidget = new ChartWidget();
// chartWidget.refresh()
super.refresh();
}
};
my hooks.py
app_include_js = "/assets/wtgcare/js/custom_chart_widget.js"
then I build the app, clear-cache , nothing happened also code is not updating still remains past code in console