Setting background colour for custom pivot table in shiny

Hello,

I have the following very basic shiny example. I am looking for a simple way to add background colour to the table and I am not entirely sure how to do it given I am passing the pivotr into dtab . Can anyone help me to for instance make the table background blue or pink?

library(shiny)
library(DT)
library(radiant.data)

ui <- fluidPage(
  

  titlePanel("Hello Shiny!"),
  sidebarLayout(
    sidebarPanel(
    ),

    mainPanel(
      dataTableOutput("Pivotable")
    )
  )
)

server <- function(input, output) {

  output$Pivotable <- DT::renderDataTable({
    tab <- pivotr(
      diamonds,
      cvars = c("clarity", "cut", "color"),
      nvar = "price") %>%
      dtab()
  
})
}

shinyApp(ui, server)

Shiny applications not supported in static R Markdown documents

Created on 2020-09-29 by the reprex package (v0.3.0)

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.