Customer Banners (Ads) - SpiceUp. AX and SpotfireX Disclaimer



If you find this site useful and you want to support, buy me a coffee   to keep this site alive and without ads.

Add tooltips for columns on a summary table

 



js

//define tooltips for measurements columns. Use \n to add a space tooltip=[ "the sum of the values", "the average of the values for each column", "min stands for minimum", "maximum value", "median is the middle number in a \nsorted, ascending or descending list of numbers", "Standar deviation refers to the square root of its variance " ]; //adds tooltips to measurements and re-run every 5 seconds in case resize happens function setTooltips(){ [...document.querySelectorAll(".frozenRowsContainer div[row]")].map((e,i)=>{e.title = tooltip[i]}) setTimeout(setTooltips,5000) } setTooltips()



If you really want to change the column titles, then change the setTooltips function to this:

function setTooltips(){ [...document.querySelectorAll(".frozenRowsContainer div[row]")].map((e,i)=>{e.innerText = tooltip[i]}) setTimeout(setTooltips,5000) }

if you really want to add html to titles, then replace "innerText" with "innerHTML"

No comments: