It would be useful to present higher-use charts before lower-use charts in the Charts dropdown. With a minor update to R/makeChartConfig an order attribute in the .yaml files works:
label: Histogram
order: 4
type: htmlwidget
domain: labs
package: safetyCharts
workflow:
widget: safetyHistogram
charts <- yaml_files %>%
lapply(function(path) {
chart <- read_yaml(path)
chart$path <- path
chart$name <- path %>% file_path_sans_ext %>% basename
return(chart)
})
charts <- charts[order(purrr::map_int(charts, function(chart) chart$order))]