The application currently gives a console warning stemming from the use of plotly_hover to trigger the data table in pane 3. This does not affect the functioning of the webapp. The warning is as follows:
Warning: The 'plotly_hover' event tied a source ID of 'A' is not registered. In order to obtain this event data, please add event_register(p, 'plotly_hover') to the plot (p) that you wish to obtain event data from.
One possible solution is just to suppress the warning. Another is to figure out if registering the event in event_register() will actually suppress the warning without functional changes.
Carson Sievert recommends using a req(!is.null) call to ensure there are no issues with the plotly_hover being empty before it is first used. At present, the req(!is.null) call is used in the DT::renderDataTable() expression to ensure a year has been hovered over before the table is triggered. Requiring a non-null value for plotly_hover in the observe() that saves out the x value from the hover suppresses the warning but does not work beacause it will by definition be null before the first hover.
The application currently gives a console warning stemming from the use of
plotly_hover
to trigger the data table in pane 3. This does not affect the functioning of the webapp. The warning is as follows:One possible solution is just to suppress the warning. Another is to figure out if registering the event in
event_register()
will actually suppress the warning without functional changes.Carson Sievert recommends using a
req(!is.null)
call to ensure there are no issues with theplotly_hover
being empty before it is first used. At present, thereq(!is.null)
call is used in theDT::renderDataTable()
expression to ensure a year has been hovered over before the table is triggered. Requiring a non-null value forplotly_hover
in theobserve()
that saves out the x value from the hover suppresses the warning but does not work beacause it will by definition be null before the first hover.