knitr::opts_chunk$set( collapse = TRUE, comment = "#>", warning=FALSE, message=FALSE )
devtools::load_all() #library(RShinyHelpers)
library(RShinyHelpers)
Call the Example Shiny app to demonstrate the shiny functionality using demoApp()
finance_vbox(toplot = -(1:10+runif(n=10,min=-1,max=1)),label = 'market index',textid = '£1M',col = 'black')
vbox(label = 'label',textid = 'value')
four_value(c('BCT','ETH','KLM','DOGE'),c('$4.00','£5.34','€7.47','£9.68'))
We style the sliderInput with bootstrap_slider_colour(slider_index = 0,colour = 'mediumseagreen')
To improve the aesthetics of the wildly popular and infinitely functional DT::Datatables()
, based on the jquery library of the same name, we implement some improved primary colouring.
Note these functions now support manipulation of both bootstrap 3, using shiny's default, and bs4 datatables, if using bslib.
We set the hover colour pink and selected colour red, with the supplementary text surrounding the bulk content, to a fun pinky-red #ff003b.
``` {r echo=FALSE, include=TRUE}
##call inside the ui declaration DT_selected_row_colour(colour = 'red') DT_hover_row_colour(colour = 'pink') DT_peripheral_colour(colour = '#ff003b')
```r DT::datatable(mtcars[1:5],selection = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.