echarts4r
echarts4r copied to clipboard
Error Bar for Grouped Data
Hi!
I was attempting to create a bar chart with error bars but it seems that the error bars do not align with the bars themselves. I took at a look at the documentation and couldn't quite figure it out. I was thinking this may be a bug.
df = data.frame('Category' = c(rep(LETTERS[1:2], each=8)),
'Xaxis' = rep(paste(rep(LETTERS[1:2], each=4), 1:4, sep='.'), 2),
'Yaxis' = 50 * abs(rnorm(16))) %>%
mutate(Lower = Yaxis - 5 * runif(16),
Upper = Yaxis + 5 * runif(16))
df %>%
group_by(Category) %>%
e_charts(Xaxis) %>%
e_bar(Yaxis, barGap ='0%') %>%
e_error_bar(Lower, Upper)
Thanks! Jon
Indeed this is a bug. Thank you for reporting it. Let me look into it.
Is there any solution for this? Thanks!