Open jerrymcummings opened 9 years ago
Hi,
If you want to solve your problem change the '{{ID}}' string in your mousever function to '#distPlot' (that is the identifier in your shiny UI pages.
The string '{{ID}}' is not used by Shiny as you have to provide an identifer anyway :-)
thx for that (i don't use Shiny even on a weekly basis, so this was def lagging)
I had tried variations of
mjs_add_mouseover("function(d, i) { $('distPlot svg .mg-active-datapoint') .text('custom text : ' + d.point.test + ' ' + i); }")
earlier without success. Even with your clue, I'm still unable to see the "custom text" string appear. I guess I'll keeping around using that as the theme.
Thanks.
Try with that:
$('#distPlot svg .mg-active-datapoint')
(Sorry my answer was not totaly precise). The reason is the following. AFAIK:
Better explainations are given by the slides of the creators of d3.js
That did the trick and I appreciate the explanation. Thank you.
Rather than show custom text on points of a scatterplot in shiny, it appears to be showing default text. If I run that same core chunk of code directly from RStudio the plot shows up in the plot pane and the points all have the expected custom mouse-over text.
Thoughts?
System info:
RStudio 0.99.467 says packages are up to date.