joshuaulrich / quantmod

Quantitative Financial Modelling Framework
http://www.quantmod.com/
GNU General Public License v3.0
794 stars 219 forks source link

I can't change the background in chart_Series #413

Open mytarmail opened 4 months ago

mytarmail commented 4 months ago

Description

Hello! I noticed that I can’t change the background, as well as several other parameters, it seems the function simply ignores this

Expected behavior

I would like to change the background

Minimal, reproducible example

set.seed(1)
library(xts)
library(quantmod)

p <- rnorm(2000) |> cumsum() |> xts(order.by = Sys.time()+1:2000) |> to.minutes(name = NULL)

myTheme <- chart_theme()
myTheme$col$bg <- "blue"

chart_Series(p, theme = myTheme)

Session Info

R version 4.3.2 (2023-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=Ukrainian_Ukraine.utf8  LC_CTYPE=Ukrainian_Ukraine.utf8   
[3] LC_MONETARY=Ukrainian_Ukraine.utf8 LC_NUMERIC=C                      
[5] LC_TIME=Ukrainian_Ukraine.utf8    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] quantmod_0.4.25 TTR_0.24.4      xts_0.13.2      zoo_1.8-12     

loaded via a namespace (and not attached):
[1] compiler_4.3.2 tools_4.3.2    curl_5.2.0     grid_4.3.2     lattice_0.21-9