| Title: | Usage Heatmap for Shiny apps |
|---|---|
| Description: | Have you ever wondered how people are enjoying your Shiny app? This package leverages 'heatmap.js' to provide heatmap of usage. You can seamlessly know where users clicked and how many times. This is useful for regression testing. |
| Authors: | David Granjon [aut, cre] |
| Maintainer: | David Granjon <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.3.9000 |
| Built: | 2026-06-01 10:44:11 UTC |
| Source: | https://github.com/RinteRface/shinyHeatmap |
Show and download record_heatmap data.
download_heatmap( trigger = NULL, path = "www", filename = "heatmap.png", timeout = 10, show_ui = TRUE, options = NULL, session = shiny::getDefaultReactiveDomain(), ... )download_heatmap( trigger = NULL, path = "www", filename = "heatmap.png", timeout = 10, show_ui = TRUE, options = NULL, session = shiny::getDefaultReactiveDomain(), ... )
trigger |
Reactive trigger to initialized the heatmap recording. This is useful if your app contains tabs or navbar. |
path |
Previously saved heatmap data for persistence. |
filename |
Screenshot file name. |
timeout |
Necessary if the page needs time to load. Expressed in milliseconds. |
show_ui |
Whether to show the download UI. Default to TRUE. |
options |
Slot for heatmap options. Expect a (nested) list. See https://www.patrick-wied.at/static/heatmapjs/docs.html#heatmap-configure. |
session |
Shiny session object. Useful to store heatmap data. |
... |
Internal. Don't use. |
By default, process_heatmap records the heatmap.
However, if you browse to the app url and add ?get_heatmap query string,
the function will run in display mode to see the heatmap data.
process_heatmap(...)process_heatmap(...)
... |
Pass in parameters for record_heatmap and download_heatmap. |
Specify options("shinyHeatmap.debug" = TRUE) to
get useful debugging messages, particularly when setting up
your heatmap.
On the JS side, Shiny creates a input$heatmap_data containing the current click data to be recorded to the file
record_heatmap( trigger = NULL, path = "www", target = ".container-fluid", type = c("click", "move"), timeout = 10, session = shiny::getDefaultReactiveDomain(), ... )record_heatmap( trigger = NULL, path = "www", target = ".container-fluid", type = c("click", "move"), timeout = 10, session = shiny::getDefaultReactiveDomain(), ... )
trigger |
Reactive trigger to initialized the heatmap recording. This is useful if your app contains tabs or navbar. |
path |
Previously saved heatmap data for persistence. |
target |
Container selector hosting the heatmap canvas. Default to Shiny fluidPage container. Be careful to change it if you use another template. |
type |
Event type: click or mouse move. Default to click. |
timeout |
Necessary if the page needs time to load. Expressed in milliseconds. |
session |
Shiny session object. Useful to store heatmap data. |
... |
Internal. Don't use. |
Include necessary dependencies.
with_heatmap(...)with_heatmap(...)
... |
Shiny UI code. |