Skip to content

Allow user to specify order of charts in dropdown. #500

@samussiah

Description

@samussiah

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))]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions