Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

chartTheme

Create A Chart Theme


Description

Create a chart.theme object for use within chartSeries to manage desired chart colors.

Usage

chartTheme(theme = "black", ...)

Arguments

theme

name of base theme

...

name=value pairs to modify

Details

Used as an argument to the chartSeries family of functions, chartTheme allows for on-the-fly modification of pre-specified chart ‘themes’. Users can modify a pre-built theme in-place, or copy the theme to a new variable for use in subsequent charting calls.

Internally a chart.theme object is nothing more than a list of values organized by chart components. The primary purpose of this is to facilitate minor modification on the fly, as well as provide a template for larger changes.

Setting style arguments for TA calls via chartTheme requires the user to pass the styles as name=value pairs with a name containing the TA call in question. See examples for assistance.

Current components that may be modified with appropriate values:

  • fg.colforeground color

  • bg.colbackground color

  • grid.colgrid color

  • borderborder color

  • minor.tickminor tickmark color

  • major.tickmajor tickmark color

  • up.colup bar/candle color

  • dn.coldown bar/candle color

  • up.up.colup after up bar/candle color

  • up.dn.colup after down bar/candle color

  • dn.dn.coldown after down bar/candle color

  • dn.up.coldown after up bar/candle color

  • up.borderup bar/candle border color

  • dn.borderdown bar/candle border color

  • up.up.borderup after up bar/candle border color

  • up.dn.borderup after down bar/candle border color

  • dn.dn.borderdown after down bar/candle border color

  • dn.up.borderdown after up bar/candle border color

Value

A chart.theme object

Author(s)

Jeffrey A. Ryan

See Also

Examples

chartTheme()
chartTheme('white')
chartTheme('white',up.col='blue',dn.col='red')

# A TA example
chartTheme(addRSI.col='red')

str(chartTheme())

quantmod

Quantitative Financial Modelling Framework

v0.4.18
GPL-3
Authors
Jeffrey A. Ryan [aut, cph], Joshua M. Ulrich [cre, aut], Wouter Thielen [ctb], Paul Teetor [ctb], Steve Bronder [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.