Skip to content

Commit

Permalink
project tables have centered numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Nov 22, 2024
1 parent e8a1950 commit d9675e7
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/figs.R
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ p <- p1 + p2 + plot_layout(ncol = 2, guides = 'collect', widths = c(0.6, 1)) &
legend.position = 'bottom'
)

png(here('docs/figs/hmpreport.png'), height = 6, width = 7, units = 'in', res = 500)
png(here('docs/figs/hmpreport.png'), height = 6.5, width = 7, units = 'in', res = 500)
print(p)
dev.off()

3 changes: 2 additions & 1 deletion R/funcs.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ tab_fun <- function(dat, yrrng, fntsz = 14, family = NULL, rowgrp = c('Primary',
tab <- reactable(
totab,
columns = list(
rowgrp = colDef(name = 'Habitat', minWidth = habmin, maxWidth = habmin, class = 'sticky left-col-1-bord', headerClass = 'sticky left-col-1-bord', footerClass = 'sticky left-col-1-bord'),
rowgrp = colDef(name = 'Habitat', minWidth = habmin, maxWidth = habmin, align = 'left', 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, maxWidth = 70)
),
defaultColDef = colDef(
headerStyle= list(fontSize = fntsz, fontFamily = family),
minWidth = 105,
maxWidth = 105,
resizable = F,
align = 'center',
style = function(value, index) {
if (index %in% bld)
list(fontWeight = "bold", fontSize = fntsz, fontFamily = family)
Expand Down
Binary file modified docs/figs/hmpreport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/summaries.html
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ <h3 class="anchored" data-anchor-id="total-2024-projects">Total 2024 projects</h
});
</script>
</div> <!-- /content -->
<script>var lightboxQuarto = GLightbox({"openEffect":"zoom","selector":".lightbox","closeEffect":"zoom","loop":false,"descPosition":"bottom"});
<script>var lightboxQuarto = GLightbox({"loop":false,"selector":".lightbox","descPosition":"bottom","closeEffect":"zoom","openEffect":"zoom"});
window.onload = () => {
lightboxQuarto.on('slide_before_load', (data) => {
const { slideIndex, slideNode, slideConfig, player, trigger } = data;
Expand Down
Binary file modified docs/tabs/gentab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/tabs/pritab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d9675e7

Please sign in to comment.