Я только что добавил переменную группы в hcaes
highchart() %>%
hc_add_series(df,type = "scatter",
hcaes(x = weight, y = height, group=name), showInLegend = FALSE) %>%
hc_tooltip(pointFormat = "height: {point.y} <br> weight: {point.x}")
И это хорошо сработало.
Из комментариев я предлагаю другие варианты.
Вариант 1
Изменить highchart()
на hchart()
hchart(df,type = "scatter",
hcaes(x = weight, y = height, group = name),
showInLegend = FALSE) %>%
hc_tooltip(pointFormat = "height: {point.y} <br> weight: {point.x}")
Вариант 2
Использование опции marker
в hc_add_series
.
highchart() %>%
hc_add_series(df,type = "scatter",
hcaes(x = weight, y = height, group = name),
showInLegend = FALSE,
marker = list(symbol = fa_icon("circle")),
color = "blue") %>%
hc_tooltip(pointFormat = "height: {point.y} <br> weight: {point.x}")