Forum Discussion
R text sizing Bug
Here is the code to reproduce the bug:
1. Create a Power BI report and R visual
2. paste following code:
.text="testing%"
par(mar = c(0,0,0,0),bg=NA,cex=3.5)
plot(c(0, 1), c(0, 1),ann = F,asp=1, bty = 'n', type = 'n', xaxt = 'n', yaxt = 'n')
text(x = 0.5, y = 0.2, .text,
col = "red")
3. Publish it to Power BI service
4.Compare the desktop and service version. You will see the text sizing is not correct in the service
I've tried serveral parameters, such as cex, ps, but none seems to work. Can anyone help?
Hi BLPYPL
Thank you for such detailed information, I can reproduce the issue and I am checking with engineer whether it is a bug and when and how to fix it.
I will come back to tell you if there is any update.
Best Reagrds
Maggie
- Anonymous8 years agoNot applicable
Hi,
Same issue here.We have first noticed the problem on 26 june.
I attach a sample code to reproduce the issue; a curious fact is that the problem does not affect the text colour!
library(grid)
library(gridExtra)d <- head(iris, 3)
g <- tableGrob(d)find_cell <- function(table, row, col, name="core-fg"){
l <- table$layout
which(l$t==row & l$l==col & l$name==name)
}
for(i in 2:4){
for(j in 2:6){
index_fg <- find_cell(g, i, j, "core-fg")
g$grobs[index_fg][[1]][["gp"]] <- gpar(cex = i*j, col = "green")
}
}grid.newpage()
grid.draw(g)