diff --git a/R/funcs.R b/R/funcs.R index 22eb9fb..d3a03ac 100644 --- a/R/funcs.R +++ b/R/funcs.R @@ -19,6 +19,8 @@ tab_fun <- function(dat, yrrng, fntsz = 14, family, rowgrp = c('Primary', 'Gener collevs <- c('Restoration', 'Enhancement', 'Protection') collabs <- c('Restoration (Ac / Mi)', 'Enhancement (Ac / Mi)', 'Protection (Ac / Mi)') + habmin <- 80 + # only unique step for primary habitat categories if(rowgrp == 'Primary'){ @@ -34,6 +36,8 @@ tab_fun <- function(dat, yrrng, fntsz = 14, family, rowgrp = c('Primary', 'Gener collevs <- grep('Restoration|Enhancement', collevs, value = T) collabs <- grep('Restoration|Enhancement', collabs, value = T) + habmin <- 180 + } # data prep @@ -123,12 +127,12 @@ tab_fun <- function(dat, yrrng, fntsz = 14, family, rowgrp = c('Primary', 'Gener tab <- reactable( totab, columns = list( - rowgrp = colDef(name = 'Habitat', minWidth = 180, class = 'sticky left-col-1-bord', headerClass = 'sticky left-col-1-bord', footerClass = 'sticky left-col-1-bord'), - tot = colDef(name = 'Total projects', minWidth = 80) + rowgrp = colDef(name = 'Habitat', minWidth = habmin, class = 'sticky left-col-1-bord', headerClass = 'sticky left-col-1-bord', footerClass = 'sticky left-col-1-bord'), + tot = colDef(name = 'Total projects', minWidth = 70) ), defaultColDef = colDef( headerStyle= list(fontSize = fntsz, fontFamily = family), - minWidth = 150, + minWidth = 100, resizable = TRUE, style = function(value, index) { if (index == nrow(totab)) diff --git a/docs/summaries.html b/docs/summaries.html index b19a652..1c2c9e8 100644 --- a/docs/summaries.html +++ b/docs/summaries.html @@ -127,8 +127,8 @@