gauge_color: Gauge colour

Description Usage Arguments Examples

View source: R/gauge.R

Description

Gauge colour, similar to the scale_colour_* family of functions from the ggplot2 package.

Usage

1
2
3
4
gauge_color(g2, colors = NULL, callback = NULL)

gauge_color_viridis(g2, option = c("viridis", "magma", "plasma",
  "inferno", "cividis"), reverse = FALSE, callback = NULL)

Arguments

g2

An object of class g2r as returned by g2r.

colors

A vector of colors.

callback

A JavaScript callback function (see cb) which returns a color.

option

Palette name.

reverse

Whether to reverse the palette.

Examples

1
2
3
g2(mtcars, asp(mpg, qsec, color = drat)) %>% 
  fig_point() %>% 
  gauge_color(c("red", "white", "blue"))

JohnCoene/g2r documentation built on March 6, 2021, 8:11 p.m.