From Shiny 0.12, it has been possible to develop applications with graphics or images that are responsive to interactions. Its implementation is very simple, as the interaction events are tracked as any other input objects and behave in the exact same way. Until the 0.12 version, there have been four basic interaction events. In order to listen to them, the corresponding argument must be specified to the plotting function where the value of this argument is the corresponding listener. The following are the events:
Hover: This tracks the position of the mouse. The argument to be passed is
hover
and the function ishoverOpts()
.Click: This tracks the position of the click. The argument is
click
and the function isclickOpts()
.Double click: This tracks the position of the double-click. The argument is
dblclick
and the function isdblClickOpts()
.Brush: This tracks the brushed area. The argument is
brush
and the function isbrushOpts()
.