Learn R Programming

rcdimple (version 0.1)

default_colors: Modify colors used in Dimple charts

Description

Modify colors used in Dimple charts

Usage

default_colors(viz, ...)

Arguments

viz
a dimple object
colors
a vector of colors in hex or a JS function, such as a d3 color scale.

See Also

Other dimple: add_legend; add_title; dimple; facet.dimple; set_bounds; xAxis.dimple, yAxis.dimple, zAxis.dimple

Examples

Run this code
ChickWeight %>%
  dimple( x = c("Time", "Diet"), y = "weight", groups = "Diet", type = "bar" ) %>%
  defaultColors( rainbow(10) )

ChickWeight %>%
  dimple( x = c("Time", "Diet"), y = "weight", groups = "Diet", type = "bar" ) %>%
  defaultColors( htmlwidgets::JS( 'd3.scale.category10()' ) )

Run the code above in your browser using DataLab