I am trying to make a highcharts plot similar to this (made with ggplot):
This code comes close, but I am uncertain how to change the label to indicate the games
rather than the win_rate.
data = data.frame(player = c('Edwin', 'Ahmad', 'Sonia', 'Jessica'),
games = c(10, 20, 15, 40),
win_rate = c(.5, .2, .8, .4))
highchart() %>%
highcharter::hc_chart(type = 'column', zoomType = 'x') %>%
highcharter::hc_plotOptions(column = list(stacking = 'normal')) %>%
highcharter::hc_xAxis(categories = data$player) %>%
highcharter::hc_add_series(name = 'Win Rate',
data = data$win_rate,
dataLabels = list(enabled = TRUE, verticalAlign = 'top'))
How can I swap out the default labels with labels of my own choosing?