Description Usage Arguments Value Examples
Retrieve the data for the current hover location
1 | hover_data(chart_data, hover_object, chart_type, max_distance = 10)
|
chart_data |
A data frame. The same data used to create the chart. |
hover_object |
The Shiny input object containing the hover info. |
chart_type |
Either "line" or "bar". For scatterplot, use "line", for area or stacked bar use "bar". Other types are not currently supported and will require manual tips. |
max_distance |
For line and scatter charts: a distance, in pixels. If the mouse is more than this distance from any point, the function will return a null data frame. |
A data frame of
1 2 3 4 5 6 7 8 9 10 | ## Not run:
output$hover_info <- renderUI({
shown <- hover_data(
chart_data = dataset(),
hover_object = input$plot_hover,
chart_type = "stacked bar")
})
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.