RinteRface / argonDash

argon dashboard template
https://rinterface.github.io/argonDash/
138 stars 37 forks source link

Programmatically set the value of 'stat' in 'argonInfoCard' #10

Closed Patrikios closed 4 years ago

Patrikios commented 5 years ago

I would like to programmatically set the value of 'stat' in the 'argonInfoCard'. I figure the best would be to render a custom UI element in the server side of the application:

    output$UI1 <- renderUI({
      argonInfoCard(
        value = reactiveData()$x, #"350,897"
        title = "Umsatzerlöse", 
        stat = ireactiveData()$y, #"2.5"
        stat_icon = "arrow-up",
        description = "2017/2016 Ratio", 
        icon = "chart-bar", 
        icon_background = "danger",
        hover_lift = TRUE,
        background_color = "default"
      )
    })

However, the outputing UI element if deformed, prolonged in its height. If I would like to set the stat value inside of the ui componennt of the shiny app, providing it with a renderText value for argonInfoCard does not apply, as it creates a div or span HTML element.

So the question is, how can I set stat value programmatically in shiny context?