Skip to content

Commit

Permalink
update combined table
Browse files Browse the repository at this point in the history
  • Loading branch information
kwlyu committed Aug 22, 2024
1 parent 824da2b commit 89315fc
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion PAC-data-analyzer/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ analysisTab <- tabItem(
fluidRow(
column(
width = 8,
shinycssloaders::withSpinner(reactableOutput("stand_in"))
shinycssloaders::withSpinner(reactableOutput("combined_table"))
),
column(
width = 4,
Expand Down Expand Up @@ -918,6 +918,60 @@ server <- function(input, output, session) {
bandline_color = "darkgreen"))))
})

output$combined_table <- renderReactable({
combined_data_filtered %>%
reactable(
theme = clean(), # Apply the clean theme for a minimalist design
pagination = FALSE, # Disable pagination for this example
columns = list(
# Customize columns with interactive data bars where appropriate
days_committed = colDef(
cell = data_bars(
data = .,
fill_color = viridis::mako(5),
background = '#F1F1F1',
text_position = 'outside-end',
number_fmt = scales::comma
)
),
av_staff = colDef(
cell = data_bars(
data = .,
fill_color = c('#FFF2D9','#FFE1A6','#FFCB66','#FFB627'),
fill_gradient = TRUE,
background = 'transparent',
number_fmt = scales::comma_format(accuracy = 0.1)
)
),
pac_staff = colDef(
cell = data_bars(
data = .,
fill_color = 'black',
fill_opacity = 0.8,
round_edges = TRUE,
text_position = 'center',
number_fmt = scales::comma
)
),
audience_count = colDef(
cell = data_bars(
data = .,
fill_color = 'white',
background = 'darkgrey',
border_style = 'solid',
border_width = '1px',
border_color = 'forestgreen',
box_shadow = TRUE,
text_position = 'inside-base',
number_fmt = scales::comma
)
)
# Add other columns as needed
)
)

})

observeEvent(input$submitNewTerm, {

})
Expand Down

0 comments on commit 89315fc

Please sign in to comment.