是否可以更改R中高图表的默认字体?
library("highcharter")
data(diamonds, mpg, package = "ggplot2")
hchart(mpg, "scatter", hcaes(x = displ, y = hwy, group = class))
答案 0 :(得分:1)
直接从highcharter手册中复制:
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')))
hchart(mpg, "scatter", hcaes(x = displ, y = hwy, group = class)) %>%
hc_add_theme(thm)
答案 1 :(得分:0)