Closed Robinmoon26 closed 1 year ago
@Robinmoon26 I must admit I coudn't make it work with e_facet either.
Another approach (and maybe that will solve it for now) is using the function combineWidgets()
of the manipulateWidget package:
library(echarts4r)
library(manipulateWidget)
df<-data.frame(group=c("A","B","C"),
value=c(57, 23, 65))
df1 <-
e_charts() |>
e_gauge(df$value[1], df$group[1])
df2 <-
e_charts() |>
e_gauge(df$value[2], df$group[2])
df3 <-
e_charts() |>
e_gauge(df$value[3], df$group[3])
combineWidgets(df1, df2, df3, nrow = 1)
CombineWidgets has saved my day many times :)
I was trying to plot multiple gauge plots from a dataframe at once as below:
df<-data.frame("group"=c("A","B","C"), "value"=c(57, 23, 65))
df|> e_charts( |> e_gauge(df$value, df$group ) |> e_facet(rows = 1, cols=3)
However, the figure showed as below, instead of having 3 gauge plots in a row:![gauge_error](https://github.com/JohnCoene/echarts4r/assets/134048736/fb691b77-5406-4d21-95be-cc6c781ad755)
I would like to know how to plot it in a right way. Thanks very much for your time.