c3_gauge: Gauge Charts

Description Usage Arguments Value Examples

View source: R/plots.R

Description

Create simple Gauge Charts

Usage

1
2
3
4
c3_gauge(c3, label = NULL, min = 0, max = 100, units = NULL,
  width = NULL, pattern = c("#FF0000", "#F97600", "#F6C600",
  "#60B044"), threshold = list(unit = "value", max = 100, values = c(30,
  60, 90, 100)), height = NULL, ...)

Arguments

c3

c3 htmlwidget object

label

list with options:

  • show: boolean

  • format: function, wrap in JS()

min

numeric

max

numeric

units

character appended to numeric value

width

integer pixel width of the arc

pattern

character vector or palette of colors

threshold

list with options:

  • unit: character one of 'percent', 'value'

  • max: numeric

  • values: numeric vector of threshold values for color change

height

integer pixel height of the chart. Proportion of gauge never changes so height scales with width despite this setting.

...

additional values passed to the gauge, color and size objects

Value

c3

Examples

1
2
3
data.frame(data=10) %>%
  c3() %>%
  c3_gauge(title = 'Colors')

c3 documentation built on March 16, 2020, 5:07 p.m.

Related to c3_gauge in c3...