joshuaulrich / quantmod

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

document title customization #270

Open anujgoyal opened 5 years ago

anujgoyal commented 5 years ago

Description

While chart_Series(symbol, name="title") works, but it is currently difficult to set the fontsize/fontcolor of that title.

Expected behavior

chart_theme() should be modified to allow for title customization. If the title is not part of chart_theme(), then chart_Series() should be modified.

Minimal, reproducible example

# option 1
mytheme <- chart_theme(title.size=14, title.color="#ff0000")
chart_Series(IBM, name="IBM: IBM", theme=mytheme)

# option 2
chart_Series(IBM, name="IBM: IBM", name.size=14, name.color="#ff0000")
helgasoft commented 4 years ago

There is a workaround

# option 3
chart_Series(IBM, name=NULL);  title('IBM', font.main=3, col.main="#ff0000", line=2.5)

Playing with line gives you the desired vertical position.