{"id":18721128,"date":"2025-11-16T17:33:43","date_gmt":"2025-11-16T17:33:43","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/tooltip-format\/"},"modified":"2025-11-16T17:33:43","modified_gmt":"2025-11-16T17:33:43","slug":"tooltip-format","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/tooltip-format\/","title":{"rendered":"Tooltip format"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi, <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">just an idea for improvement. How about adding an option to add extra character\/information to the tooltip. <br \/><br \/><strong>Use case:<\/strong><br \/>I have a pie chart, where my dataset values are set in percents. What would I like to, is to simply add there a &#8220;%&#8221; percentage sign to the tooltip. So that it is clear what type of value is chart representing.<br \/><br \/>I have made it work by manually adding &#8221; %&#8221; to chart.min.js:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tooltip: {<br \/>    callbacks: {<br \/>        title: () =&gt; \"\",<br \/>            label(t) {<br \/>            let e = t.label;<br \/>            const i = \": \" + t.formattedValue + \" %\";<br \/>            return Y(e) ? ((e = e.slice()), (e&#091;0] += i)) : (e += i), e;<br \/>        },<br \/>    },<br \/>},<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">But that would be obviously overwritten in next update and also one might not want to have it displayed in every chart. <br \/>Would be great if you could add this option \ud83d\ude42 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you for great plugin.<br \/>Matej<\/p>\n","protected":false},"template":"","class_list":["post-18721128","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18721128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18721128\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18721128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}