echarts4r icon indicating copy to clipboard operation
echarts4r copied to clipboard

Error Bar for Grouped Data

Open JonP-16 opened this issue 5 years ago • 2 comments

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

JonP-16 avatar Sep 09 '19 14:09 JonP-16

Indeed this is a bug. Thank you for reporting it. Let me look into it.

JohnCoene avatar Sep 13 '19 19:09 JohnCoene

Is there any solution for this? Thanks!

liyi-1989 avatar Sep 25 '20 18:09 liyi-1989