Description Usage Arguments Details Value References Examples
When an echart object is generated, you can modify it by setting title and
subtitles using %>%.
1 2 3 4  | 
chart | 
 
  | 
title | 
 text of the title. If written in markdown format   | 
subtitle | 
 text of the subtitle. If written in markdown format   | 
link | 
 link of the title  | 
sublink | 
 link of the subtitle  | 
pos | 
 the clock-position of title (and subtitle), refer to   | 
bgColor | 
 background color of title. Default 'rgba(0,0,0,0)' (transparent)  | 
borderColor | 
 border color of the title. Default '#ccc'.  | 
borderWidth | 
 border width of the title. Default 0px (not shown).  | 
textStyle | 
 You can place self-defined textStyle list of the title here. E.g.,   | 
subtextStyle | 
 You can place self-defined textStyle of the subtitle here.  | 
show | 
 Logical. Whether to show the title. If you want to remove title from the echarts object, set it NULL.  | 
... | 
 elipsis  | 
In echarts with timeline, you can set title, subtitle, link, sublink, bgColor,
borderColor, borderWidth as vectors of the same length as z. For textSytle,
subtextStyle, you need to pack the user-defined lists in a list.
A modified echart object
http://echarts.baidu.com/echarts2/doc/option.html#title~title
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42  | ## Not run: 
## simple echarts scatter plot
g = iris %>% echartR(x=Sepal.Width, y=Petal.Width, series=Species,
                      type='scatter')
## set simple titles
g %>% setTitle(title='Iris data set', subtitle='by: R. A. Fisher')
## set titles with links and textStyles
g %>% setTitle(
  '[Iris data set](https://en.wikipedia.org/wiki/Iris_flower_data_set)',
  '[R. A. Fisher](https://en.wikipedia.org/wiki/Ronald_Fisher)',
  textStyle=textStyle(fontFamily='Courier New', fontSize=24, color='gold'),
  subtextStyle=textStyle(color='silver'), bgColor='lightgreen')
## echarts with timeline
g1 = iris %>% echartR(x=Sepal.Width, y=Petal.Width, t=Species, type='scatter')
## simple titles/subtitles
g1 %>% setTitle(
    '[Iris data set](https://en.wikipedia.org/wiki/Iris_flower_data_set)',
    '[R. A. Fisher](https://en.wikipedia.org/wiki/Ronald_Fisher)')
## user-defined titles/subtitles
titles = c(
    '[Iris setosa](https://en.wikipedia.org/wiki/Iris_setosa)',
    '[Iris versicolor](https://en.wikipedia.org/wiki/Iris_versicolor)',
    '[Iris virginica](https://en.wikipedia.org/wiki/Iris_virginica)')
g1 %>%
setTitle(
   titles,
   textStyle=list(
      textStyle(fontFamily='Impact', color='red', fontStyle='normal'),
      textStyle(fontFamily='Times New Roman', color='green'),
      textStyle(fontFamily='Calibri', color='blue', fontStyle='oblique')
   ),
   bgColor='lightyellow')
## textStyle is a list length 3, mapping 3 levels for timeline
## End(Not run)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.