Convert value to percent in highchart tooltip

I've made a treemap in high charter and I want to print the value multiplied by 100 and add a percentage symbol on the end. I currently have this code that produces the image below

hchart(dout, type = "treemap")%>%
  hc_tooltip(pointFormat = "<b>{}</b>:<br>
                             value: {point.value:.3f}%<br>")


Based on my reading of the high charter documentation, I need to do something like this using a JS script function (but this exact code doesn't produce what I want) :

hchart(dout, type = "treemap")%>%
  hc_tooltip(pointFormat = "<b>{}</b>:<br>",
             formatter = JS("function(){ return point.value * 100 + '%'; }"))

I'm fairly new to R and definitely don't have any experience with JS
I've read this

and this :

and I've searched for examples of how formatter is used but I still don't understand.

Just updating this post. After searching for understanding about how to use a JS function and not getting anywhere I decided just to move upstream in my code and multiply the value that becomes {point.value} by 100. No changes needed to the code block I posted.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.