default_colors: Modify colors used in Dimple charts

Description Usage Arguments See Also Examples

Description

Modify colors used in Dimple charts

Usage

1

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

1
2
3
4
5
6
7
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()' ) )

timelyportfolio/rcdimple documentation built on May 31, 2019, 2:02 p.m.