有没有一种方法可以使轴标签居中并更改其字体大小。默认情况下,echarts4r将它们放在末尾,如下所示。生成它的代码是:
as.data.frame(cars) %>% e_charts(speed) %>% e_bar(dist) %>%
+ e_axis_labels( y = "Distance", x = 'Speed')
图:
答案 0 :(得分:0)
John Coene在他的github上回答了这个问题,我将其粘贴在这里以供将来参考[e_x_axis中的位:
cars %>%
e_charts(dist) %>%
e_scatter(speed) %>%
e_x_axis(
name = "SPEED",
nameLocation = "middle",
nameTextStyle = list(
color = "red",
fontSize = 24
)
)