Highchart theme constructor

Share:

Description

Function to create highcharts themes.

Usage

1

Arguments

...

A named parameters.

Details

More examples are in http://www.highcharts.com/docs/chart-design-and-style/themes.

Examples

 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
hc <- highchart(debug = TRUE) %>% 
  hc_add_series_scatter(mtcars$wt, mtcars$mpg, color = mtcars$cyl) %>% 
  hc_chart(zoomType = "xy") %>% 
  hc_title(text = "Motor Trend Car Road Tests") %>% 
  hc_subtitle(text = "Motor Trend Car Road Tests") %>% 
  hc_xAxis(title = list(text = "Weight")) %>% 
  hc_yAxis(title = list(text = "Miles/gallon")) %>% 
  hc_tooltip(headerFormat = "<b>{series.name} cylinders</b><br>",
             pointFormat = "{point.x} (lb/1000), {point.y} (miles/gallon)")

hc

thm <- hc_theme(
 colors = c('red', 'green', 'blue'),
 chart = list(
 backgroundColor = "#15C0DE"
 ),
 title = list(
   style = list(
     color = '#333333',
     fontFamily = "Erica One"
   )
 ),
 subtitle = list(
   style = list(
     color = '#666666',
     fontFamily = "Shadows Into Light"
   )
 ),
 legend = list(
   itemStyle = list(
     fontFamily = 'Tangerine',
     color = 'black'
   ),
   itemHoverStyle = list(
     color = 'gray'
   )   
  )
)

hc %>% hc_add_theme(thm)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.