R/select.R

Defines functions v_default_select

v_default_select <- function(vc,
                             mapdata,
                             data_id,
                             ...) {
  mapdata <- split(mapdata, as.character(mapdata$select))
  vc$x$select <- list(
    dataId = data_id,
    data = mapdata,
    config = list(
      data = lapply(
        X = names(mapdata),
        FUN = function(x) {
          list(text = x, value = x)
        }
      )
    )
  )
  return(vc)
}

Try the vchartr package in your browser

Any scripts or data that you put into this service are public.

vchartr documentation built on April 12, 2025, 1:51 a.m.