rCharts/Highcharts reversedStacks not working in R -
i want reverse order of stacking in column plot using highcharts
rcharts
. found yaxis.reversedstacks
in api did not manage work within r. have idea?
library(data.table) library(dplyr) library(rcharts) mydata <- data.table(xaxis = c(0,1,0,1), value = c(0.6,0.8,0.4,0.55), type = c("a", "b")) plot <- rcharts:::highcharts$new() plot$chart(type = "column") plot$plotoptions(column = list(stacking = "normal")) (.type in unique(mydata$type)) { .currdata <- mydata %>% filter(type == .type) # .productionplot$series(name = .type, data = .currdata$availability, # type = "line", yaxis = 1, stack = .type, # marker = list(enabled = false)) plot$series(name = .type, data = .currdata$value, type = "column") } # jfiddle of api page: # http://api.highcharts.com/highcharts#yaxis.reversedstacks # # yaxis: { # reversedstacks: false # }, # should work this: plot$yaxis(reversedstacks = false) plot
the answer question itself. had update packages. in rcharts
version 0.4.2 did not work. in version 0.4.5, does.
Comments
Post a Comment