首页 > 解决方案 > 在R中设置highcharter柱形图列的粗细

问题描述

我想知道是否有一种方法可以在 R 中设置柱形图的 highcharter 列的厚度。

library(highcharter)
pokemon%>%
  count(type_1)%>%
  arrange(n)%>%
  hchart(type = "column", hcaes(x = type_1, y = n))

标签: rr-highcharter

解决方案


您可以使用pointWidth选项:

pokemon%>%
  count(type_1)%>%
  arrange(n)%>%
  hchart(type = "column", hcaes(x = type_1, y = n)) %>% 
  hc_plotOptions(column = list(pointWidth = 100)) 

推荐阅读