ggRadar with interactive=TRUE cannot change color

259 Views Asked by At

I want to make an interactive graph on R with the ggRadar function in ggiraphExtra. I want to define different colors for each group.

However, as soon as I use the option Interactive=true I can't change the colors :(

Can anyone help me?

mycolors <- colorRampPalette(brewer.pal(3,  "Paired"))(3)

mycolors
> "#A6CEE3" "#1F78B4" "#B2DF8A"


p_static=ggRadar(mtcars, aes(colour = cyl, fill=cyl), rescale = TRUE, legend.position = "left",  interactive = FALSE, use.label = TRUE)

p_static+scale_color_manual(values = mycolors) +scale_fill_manual(values = mycolors)

works, but now with interactive=TRUE:

p_interactive=ggRadar(mtcars, aes(colour = cyl, fill=cyl), rescale = TRUE, legend.position = "left",  interactive = TRUE, use.label = TRUE)

p_interactive+scale_color_manual(values = mycolors) +scale_fill_manual(values = mycolors)

doesn't work...

radar plot

0

There are 0 best solutions below