I am unable to get hover working for a chart using highchart. I just get the value but not the name .
The format I want to: value
Below is my data and the code:
fntltp <- JS("function(){
return this.point.x + ' ' + this.series.yAxis.categories[this.point.y] + ':<br>' +
Highcharts.numberFormat(this.point.value, 2);
}")
highchart() %>%
hc_chart(type = "treemap") %>%
hc_xAxis(categories =df_net$to) %>%
hc_add_series(data = df_net$value,
name = "interaction data",colorByPoint = TRUE)%>%
hc_tooltip(formatter = fntltp) %>%
hc_add_theme(hc_theme_google())
Month_considered to value
1 Apr-17 aaaaaaa 20.641753
2 Apr-17 bbbbbbbb 75.953825
3 Apr-17 ccccccc 5.947955
4 Apr-17 dddddddd 12.013305
5 Apr-17 eee 2.778321
6 Apr-17 fffffff 18.880845
7 Apr-17 ffff 0.763060
8 Apr-17 asdasda 11.348073
9 Apr-17 etreter 6.574056
10 Apr-17 yuyuyu 3.776169