Closed zhiboz closed 8 years ago
hi @zhiboz glad you like the package. C3 treats columns as a series of data so a single row will group bars as you describe. Adding an addition row illustrates the behavior
data.frame(a=c(1,2), b=c(3,2), c=c(2,1)) %>%
c3() %>%
c3_bar()
To separate the columns as you describe you need to restructure you data.frame and define the x axis within the c3()
function.
data.frame(x=c('a','b','c'), y=c(1,3,2)) %>%
c3(x='x') %>%
c3_bar()
Thanks @mrjoh3! It works like a charm!
firstly, many thanks for a great package! trying to use c3_bar with the code below, which produces a bar chart with three bars in one group, with no gaps between bars. how may I code it to produce the bars in three separate groups. thanks!