How to connect a button in UI to an echarts4r graph in server?

...This is my code...

ui <- fluidPage(

sliderInput(inputId = "x", slider for age
label = "Age:",
value = c(min(df$Age, na.rm = TRUE), max(df$Age,na.rm = TRUE)),
min = min(df$Age,na.rm = TRUE),
max = max(df$Age, na.rm = TRUE),
step = 1,
sep=""),
echarts4rOutput("total")
)
server <- function(input, output, session) {

total <- reactive({
total <- e_charts(df$Age) %>% # initialise and set x
e_bar(df[df$Age==input$x,])

})

output$total <- renderEcharts4r({
total()
})
}
shinyApp(ui, server)

The image is below. Can anyone help me with this?
I am trying to get a slider that filters age using echarts4r

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.