4

Using rpivotTable in a Shiny app. It works wonderfully; however, I would like to customize the column widths & background colors/theme within the table itself.

Seems it might be possible via CSS, but I presently have no idea where to start.

Here's the (server) code:

function(input, output, 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's the UI:

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

Any suggestions? Thanks in advance.

nicolaskruchten
  • 26,384
  • 8
  • 83
  • 101

0 Answers0