I am using plotly R library to create pie charts and in the latest CRAN version 4.6 it seems there is some default hardcoded margins, padding added to it. I am not able to override the margins, padding through layout configuration also :
Example :
USPersonalExpenditure <- data.frame("Categorie"=rownames(USPersonalExpenditure), USPersonalExpenditure)
data <- USPersonalExpenditure[,c('Categorie', 'X1960')]
plot_ly(data, labels = ~Categorie, values = ~X1960, type = 'pie') %>%
layout(title = 'United States Personal Expenditures by Categories in 1960')
The above code is making pie chart without any padding or margins in plotly 4.5.6 but in 4.6 there is a default margin, padding added to it.
I tried to remove the margins but it doesn't seem to have any effect :
plot_ly(data, labels = ~Categorie, values = ~X1960, type = 'pie') %>%
layout(title = 'Tes Graph', margin = list(t = 0, b = 0, l = 0, r = 0, pad = 0))
Can you please help me if I am missing something, I want to remove the margins, padding from my pie chart? It was perfect with version 4.5.6
devtools::install_github("ropensci/plotly")
– Mike Wise