NOTE: the below code is for Highcharts in R, but obviously any solution in 'normal' Highcharts code is also more than welcome!
I'm trying to print the mean (indicated by the diamond symbol in the example, below), and a difference to benchmark (not included in the sample data below) to a horizontal stacked bar chart.
At first I thought to plot a second graph, and combine them with hw_grid, but aligning them is really tricky. Hence I thought I'd add the numbers as the labels on a second x-axis.
I know it's possible to add multiple y-axes (Two y Axis in Highcharter in R, and https://www.highcharts.com/demo/combo-dual-axes), but because this is a horizontal chart, it needs to be the x-axis, and there doesn't seem to be an equivalent?
Here's the dummy data to reproduce in R:
library(dplyr)
library(highcharter)
df1 = data.frame("label"= paste0("Label", c(1,1,1,2,2,2,3,3,3,4,4,4)),
"value" = c(-100,231,110, -189,299,198, -199,150,298, -90,180,155),
"grade" = rep(c("Disagree","Neutral","Agree"), 4))
df2 = data.frame("x" = c(0,1,2,3),
"y" = c(200,100,250,280))
highchart() %>%
hc_add_series(df1, type="bar", hcaes(x=label,y=value,group=grade)) %>%
hc_add_series(df2, type="scatter", marker=list(symbol='diamond', radius=8)) %>%
hc_plotOptions(bar = list(stacking="normal")) %>%
hc_xAxis(type = "category") %>%
hc_yAxis(visible=FALSE)