Skip to contents

Create a Progress Chart

Usage

v_progress(
  vc,
  mapping = NULL,
  data = NULL,
  name = NULL,
  ...,
  serie_id = NULL,
  data_id = NULL
)

Arguments

vc

A chart initialized with vchart().

mapping

Default list of aesthetic mappings to use for chart.

data

Default dataset to use for chart. If not already a data.frame, it will be coerced to with as.data.frame.

name

Name for the serie, only used for single serie (no color/fill aesthetic supplied).

...

Additional parameters for the serie.

data_id, serie_id

ID for the data/serie, can be used to further customize the chart with v_specs().

Value

A vchart() htmlwidget object.

Examples


library(vchartr)

vchart() %>%
  v_progress(aes(0.85, "My progress"))
data.frame( x = c(0.4, 0.3, 0.8, 0.6), y = paste("Course", 1:4) ) %>% vchart() %>% v_progress( aes(x, y), cornerRadius = 20, bandWidth = 30 ) %>% v_scale_y_discrete( label = list(visible = TRUE), domainLine = list(visible = FALSE) )