Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data, Code and Visualization: valueBoxes and Sparklines #4

Open
utterances-bot opened this issue Sep 6, 2021 · 5 comments
Open

Data, Code and Visualization: valueBoxes and Sparklines #4

utterances-bot opened this issue Sep 6, 2021 · 5 comments

Comments

@utterances-bot
Copy link

Data, Code and Visualization: valueBoxes and Sparklines

http://jkunst.com/blog/posts/2020-06-26-valuebox-and-sparklines/

Copy link

Thank you for this! I'm excited to try it out in my app!

Copy link

It seems like its not possible to control width? Seems like it hard codes width to 4 even if i change it to 12

@jbkunst
Copy link
Owner

jbkunst commented Oct 18, 2021

Hi @Sir-Chibi

  1. Is not hardcoded, the default value is 4 if the value is not given (function(..., width = 4)).
  2. This behavior works only in small screens (sm) due the line paste0("col-sm-", width). This is the original behavior of the original shiny::valueBox function.

If you want change, you can try change paste0("col-sm-", width) with paste0("col-", width) using as https://getbootstrap.com/docs/4.0/layout/grid/#grid-options.

Kind regards

Copy link

This is so beautiful. I will apply these techniques to my company's boring dashboard

Copy link

Hi Joshua,

Great work on 04-shinydashboard-n-spakrlines. Loved it!

I am having hard time making these widgets compatible with shiny apps outside shinydashboard. It will be great if these widgets become compatible with bslib somehow.

For instance, the widgets are not behaving in the following UI configuration. Any suggestions are much appreciated.

llibrary(bslib) # Control bs_theme & additional bs rules bs_add_rules
ui <- bootstrapPage(
theme = bs_theme(version = 5, bootswatch = "cerulean"),
fluidRow(
valueBoxOutput("vbox"),
valueBoxOutput("vbox2"),
valueBoxOutput("vbox3")
)
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants