Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions R/makeChartConfig.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ makeChartConfig <- function(dirs, sourceFiles=TRUE){
chart <- read_yaml(path)
chart$path <- path
chart$name <- path %>% file_path_sans_ext %>% basename
chart$order <- ifelse(
is.null(chart$order),
length(yaml_files) + 1,
chart$order
) %>% as.numeric

return(chart)
})



names(charts) <- yaml_files %>% file_path_sans_ext %>% basename
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably need to call names() before order() since yaml_files isn't getting reordered. looks good otherwise!

charts <- charts[order(purrr::map_dbl(charts, function(chart) chart$order))]

message("Found ", length(yaml_files), " config files: ",paste(names(charts),collapse=", "))

Expand Down
3 changes: 1 addition & 2 deletions R/mod_chartsTab.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ chartsTab <- function(input, output, session, chart, data, mapping){
message(chart$name, " has an init.")
print(chart$functions[chart$workflow$init])
params <- do.call(chart$functions[[chart$workflow$init]], params)
print(params)
}
}
return(params)
Expand Down Expand Up @@ -94,4 +93,4 @@ chartsTab <- function(input, output, session, chart, data, mapping){
type=chart$type
)
}
}
}
4 changes: 2 additions & 2 deletions R/mod_filterTab.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ filterTabUI <- function(id, filterDomain = "dm"){
id = ns("pbar"), value = 100,
total = 100, display_pct = TRUE
),
shiny::dataTableOutput(outputId = ns("table")),
DT::dataTableOutput(outputId = ns("table")),
tags$p("Code dplyr:"),
verbatimTextOutput(outputId = ns("code_dplyr")),
tags$p("Expression:"),
Expand Down Expand Up @@ -80,7 +80,7 @@ filterTab <- function(input, output, session, domainData, filterDomain, id_col){
)
})

output$table <- shiny::renderDataTable({
output$table <- DT::renderDataTable({
res_filter$data_filtered()
}, options = list(pageLength = 5))

Expand Down
Loading