Add or change indicators for dashboard

Hello;

Can someone advise me from where I can change or add indicators for dashboard (customer or supplier dashboard)?

I tried from erpnext/public/js/utils.js and I tried from frappe/frappe-bench/sites/assets/js/erpnext.min.js in the below script:

$.extend(erpnext.utils, {
set_party_dashboard_indicators: function set_party_dashboard_indicators(frm) {
if (frm.doc.__onload && frm.doc.onload.dashboard_info) {
var info = frm.doc.onload.dashboard_info;
frm.dashboard.add_indicator(
(‘Annual Billing: {0}’, [format_currency(info.billing_this_year, info.currency)]), ‘blue’);
frm.dashboard.add_indicator(
(‘Total Unpaid: {0}’, [format_currency(info.total_unpaid, info.currency)]), info.total_unpaid ? ‘orange’ : ‘green’);
}
},

But without any luck. I did service supervisor restart and I did bench migrate without any change.
Appreciate the kindly help.

Regards
Bilal

2 Likes

Hello;
Please, can someone help and advise me?
Regards
Bilal

Have you checked your browser console for any errors or clues?

Bravo @clarkej and big thanks for you.
It is worked and the change can be made from frappe/frappe-bench/sites/assets/js/erpnext.min.js.

One more help if possible:
I need to have the indicators in second line "another bar to be below the current one). How?

As shown in the image, I need to have indicators to be below the red rectangle. How?
Regards
Bilal

1 Like

Good you were successful -

Sorry I can’t advise you how to position, my guess is perhaps css knowhow…

1 Like

I tried to add indicators as you can see in the image but they are coming beside each other.
I would to know how to be able to add a new row for indicators (for example, each row to contain 2 or 3 indicators).
Appreciate if someone can help in how to do it.
You told me that css know how, so hope someone of css can help.
Again, thank you a lot for your kindly advise and help.
Regards
Bilal