timelyportfolio / rcdimple

htmlwidgets for rCharts + dimple
http://www.buildingwidgets.com/blog/2015/3/18/week-11-dimple-as-htmlwidget
MIT License
28 stars 9 forks source link

Multiple colors required for default_colors() #23

Closed kferris10 closed 8 years ago

kferris10 commented 8 years ago

I'm using group to specify the variables used in my tooltips like so

mtcars %>% dimple(x = "wt", y = "mpg", group = "hp")

I'd like to set all the bubbles to have the same color, but it looks like default_colors() requires multiple values.

mtcars %>% dimple(x = "wt", y = "mpg", group = "hp") %>% default_colors("red")

I can fix this by doing the following, but is there a better fix?

mtcars %>% dimple(x = "wt", y = "mpg", group = "hp") %>% default_colors(c("red", "red"))

> devtools::session_info()
Session info ------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 3.1.3 (2015-03-09)
 system   x86_64, mingw32             
 ui       RStudio (0.99.473)          
 language (EN)                        
 collate  English_United States.1252  
 tz       America/New_York            

Packages ----------------------------------------------------------------------------------------------------------
 package     * version date       source                                   
 devtools    * 1.7.0   2015-01-17 CRAN (R 3.1.3)                           
 digest      * 0.6.8   2014-12-31 CRAN (R 3.1.3)                           
 htmltools     0.2.6   2014-09-08 CRAN (R 3.1.3)                           
 htmlwidgets   0.5.1   2015-09-16 Github (ramnathv/htmlwidgets@3a2e312)    
 lattice     * 0.20-30 2015-02-22 CRAN (R 3.1.3)                           
 magrittr    * 1.5     2014-11-22 CRAN (R 3.1.3)                           
 rcdimple      0.1     2015-08-18 Github (timelyportfolio/rcdimple@29e9795)
 rstudioapi  * 0.3.1   2015-09-16 Github (rstudio/rstudioapi@d0417a9)
timelyportfolio commented 8 years ago

Nope, that looks like a bug. Thought I had worked all these out. Will fix in the next couple of minutes.

kferris10 commented 8 years ago

Well that was quick! Thanks.