How can I edit the tooltips that appear on chart visualizations?

  • 2
  • Question
  • Updated 2 years ago
  • Answered
I know that I can edit the tooltip, but I'd like a way to add dynamic info to the tooltip and not sure how to do this. Namely, I'd like to add a percentage to the tooltip. Screenshot below, any advice is appreciated.



Thanks!
Photo of Eulogio Gallo

Eulogio Gallo

  • 1,874 Points 1k badge 2x thumb
  • excited

Posted 2 years ago

  • 2
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
I believe the highcharts API and a before render snippet is your only option here.
Photo of Eulogio Gallo

Eulogio Gallo

  • 1,874 Points 1k badge 2x thumb
Thanks Matt! For anyone interested, I was able to use the following code during 'Before Load' to modify the tooltip:



var chartObj = arguments[0],
$ = skuid.$;

$.extend(chartObj,{

tooltip: {

enabled:true,

formatter: function() {
return "\u25CF " + this.series.name + ": " + this.point.y + "
" + CUSTOMVARIABLE + "%
";
}

}

});
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,240 Points 5k badge 2x thumb
Eulogio~

Glad you were able to figure it out! Thanks for sharing your solution!!! 

Thanks!
Karen