posit-dev / posit-dev/py-shiny
Possible to access reactives in arguments of render functions?
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 135
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
Description
In R-Shiny, a plot can have a dynamic width, for example:
library(shiny)
ui <- fluidPage(
numericInput("size", "size", 500),
plotOutput("plot")
)
server <- function(input, output, session) {
output$plot <- renderPlot(plot(rnorm(50)), width = function() input$size)
}
shinyApp(ui, server)
Is an equivalent of this supported in py-Shiny?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named; start by tracing the Python render-function entry point and how reactive arguments are handled. Compare its behavior with the R-Shiny renderPlot example, and consider the work complete when a reactive width can be passed to a plot render function and updates correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100