I saw this done in rCharts Ramnath V, in his graphic example of NYTimes. rCharts sits on top of Brilliant. You can check out the fully reproducible and clearly described example here .
This piece of code is what you need:
require(rCharts) p1 <- rPlot(SOG ~ yearID, data = team_data, type = 'point', size = list(const = 2), color = list(const = '#888'), tooltip="function(item){return item.SOG +'\n' + item.name + '\n' + item.yearID}" ) p1$print('chart1')
Notice how it uses the Javascript function as an argument to the tooltip for rPlot.
Another option
You can also try wrapping your element inside tags$div()
Although not quite what you are looking for in this related question , Joe Cheng offers exactly that, but for UI.R. (The difference is that in this example, the tooltip is static text.)
Say you have sliderInput :
tags$div(title="this static text will show up in the tooltip", sliderInput(
Hope this helps you move forward.
Ram narasimhan
source share