Frappe Cloud Support Partners Foundation Frappe School

Format Chart Tooltip values


How do you format the Dashboard Chart tooltip values using the ‘Chart Options’ ??

Is there any way to get the currency as well ??


Can any one advise on how to add chart options like “formatTooltipX” in to the custom options box ??

as far as I know tool tip is related to the text attribute of the dom element. so you can change the text attribute via jquery accordingly.


Thanks for the reply… But in that case, won’t we need to make custom report /chart to use jquery ?

When I wrote [Tutorial] Script Report / Chart I spent many hours trying to figure out how to use some of the parameters mentioned in and, especially tooltipOptions and lineOptions. Should you make more progress then please let us know…

It appears that tooltipOptions is not widely used. I searched the ERPNext github repository and found only 12 hits :

Hi @EugeneP

Custom Option uses JSON format… so I tried

    "tooltipOptions": {"formatTooltipX": "d => (d + ' ').toLowerCase()"},
    "tooltipOptions": {"formatTooltipY": "d => d + ' pts'"}

it saves ok with out any error.

But when you reload the chart , it goes blank with the error below

Now i2 not a function refers to this line 64466 in the desk.bundle.js

Any idea on why ?

I’m afraid not…