2

Does anyone know how I can remove the border around an ms chart object when I insert it in a word document using office R?

Here is the code to create the chart:

library(mscharts);library(officer)   
test_data <- data.frame("Var1" = c(2,4,6,8), "Var2" = c(2,4,6,8), "Group" = c("A","B","A","B"))

my_barchart <- ms_barchart(data = test_data ,
                       x = "Var1", y = "Var2", group = "Group")

Then I insert it to the office r document with

body_add_chart(chart = my_barchart, style = "centered") 

The chart looks fine, but appears with a border around it which I want to remove. I think you should be able to do this with the style argument but I can't quite figure out how.

David Gohel
  • 9,180
  • 2
  • 16
  • 34
clairekelley
  • 427
  • 2
  • 4
  • 11

0 Answers0