有没有一种方法可以将轴标签居中并更改它们的字体大小。默认情况下,echarts4r将它们放在最后面,如下所示。生成它的代码是: as.data.frame(cars) %>% e_charts(speed) %>% e_bar(dist) %>% + e_axis_labels( y = "Distance", x = 'Speed') 图示:
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 ) )