我正在使用 highcharter 包制作直方图。我想摆脱默认的分数范围显示 - (x, y]
- 并将其替换为以下内容:score ranges: x to y
library(highcharter)
apple <- c(0, 22, 5, 32, 34, 35, 56, 67, 42, 67, 12, 99, 46, 78, 43, 67, 33, 11)
hchart(apple, color = "#a40c19", breaks = 20) %>%
hc_yAxis(title = list(text = "Number of Apples")) %>%
hc_xAxis(title = list(text = "Score (0-100)")) %>%
hc_tooltip(borderWidth = 1, sort = TRUE, crosshairs = TRUE,
pointFormat = "Score Range: {point.x} to {point.x} <br> Number of Apples: {point.y}") %>%
hc_legend(enabled = FALSE)