Skip to content

Commit

Permalink
fix for #21
Browse files Browse the repository at this point in the history
  • Loading branch information
shahronak47 committed Mar 30, 2023
1 parent 21ee141 commit 7c94767
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/mod_indicator_trend_tab_module.R
Original file line number Diff line number Diff line change
Expand Up @@ -1075,8 +1075,7 @@ mod_indicator_trend_tab_module_server <- function(id) {
} else if(nrow(df)==0){
NULL
} else {
# make value numeric
df$value <- round(as.numeric(df$value), 2)
num_cols <- unique(df$key)
# spread data
df <- df %>% tidyr::spread(key = 'key', value = 'value')
DT::datatable(df,
Expand All @@ -1089,7 +1088,10 @@ mod_indicator_trend_tab_module_server <- function(id) {
buttons = list('csv')
),
selection = 'none'
)
) %>%
DT::formatRound(columns=num_cols, digits=2) %>%
#Thousand number separator for columns to compare along with benchmark
DT::formatCurrency(columns = num_cols, currency = "", interval = 3, mark = ",")
}
})

Expand Down

0 comments on commit 7c94767

Please sign in to comment.