| Title: | A Histogram Slider Input for 'Shiny' |
|---|---|
| Description: | A histogram slider input binding for use in 'Shiny'. Currently supports creating histograms from numeric, date, and 'date-time' vectors. |
| Authors: | Carson Sievert [cre, aut] (ORCID: <https://orcid.org/0000-0002-4958-2844>), Samuel Hogg [ctb, cph] (Original author of histoslider React component) |
| Maintainer: | Carson Sievert <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1.9000 |
| Built: | 2026-05-26 09:54:25 UTC |
| Source: | https://github.com/cpsievert/histoslider |
Creates a Shiny UI input binding to a histogram with a slider "filter" control.
input_histoslider( id, label, values, start = NULL, end = NULL, width = "100%", height = 175, breaks = rlang::missing_arg(), options = list() )input_histoslider( id, label, values, start = NULL, end = NULL, width = "100%", height = 175, breaks = rlang::missing_arg(), options = list() )
id |
An input id. |
label |
A label for the input (can be |
values |
a vector of numeric values for which the histogram is desired. |
start |
A numeric value for the starting handle. |
end |
A numeric value for the ending handle. |
width, height
|
Any valid CSS unit defining the width/height. |
breaks |
determines how histogram bins are computed (see |
options |
a list of histoslider options. |
A Shiny UI input element.
if (interactive()) { library(shiny) shinyApp( input_histoslider("x", "Random", rnorm(100)), function(input, output) { observe(print(input$x)) } ) }if (interactive()) { library(shiny) shinyApp( input_histoslider("x", "Random", rnorm(100)), function(input, output) { observe(print(input$x)) } ) }
Change the value of a input_histoslider() on the client (must be called
inside a currently active user session). See
here
for an example.
update_histoslider( id, label = NULL, values = NULL, start = NULL, end = NULL, breaks = rlang::missing_arg(), options = NULL, session = shiny::getDefaultReactiveDomain() )update_histoslider( id, label = NULL, values = NULL, start = NULL, end = NULL, breaks = rlang::missing_arg(), options = NULL, session = shiny::getDefaultReactiveDomain() )
id |
An input id. |
label |
A label for the input (can be |
values |
a vector of numeric values for which the histogram is desired. |
start |
A numeric value for the starting handle. |
end |
A numeric value for the ending handle. |
breaks |
determines how histogram bins are computed (see |
options |
a list of histoslider options. |
session |
The shiny user |
Any arguments with NULL values will be ignored; they will not
result in any changes to the input object on the client.
Nothing.