RpivotTable & Shiny: Resize Columns and Colors

Using rpivotTable in a Shiny app. It works wonderfully; however, I would like to adjust the column width and background color / theme inside the table itself.

This seems to be possible with CSS, but I don't know where to start.

Here's the (server) code:

(entry, exit, session) {

output$pivot <- renderRpivotTable({
rpivotTable(data =   df,  
            rows = c("Age"),
            cols=c("Condition","Sex"),
            vals = "id",
            exclusions= list( Sex = list( "null")),
            aggregatorName = "Count", 
            rendererName = "Bar Chart", 
            width="500px", 
            height="500px")
  })
}

And here is the user interface:

 tabPanel("Pivot Analytics", 
                    fluidRow(
                      column(12, div(style = 'overflow-x: scroll', rpivotTableOutput("pivot")))
                      ))

Any suggestions? Thanks in advance.

+4
source share

Source: https://habr.com/ru/post/1655793/


All Articles