Forum Discussion
R visual - responsive visualization in power BI
- 8 years ago
Hi, thanks for your help reporting this bug.
There was a bug fix a little while ago that appears to have unintentionally led to this regression. We already know the fix, it is currently in the pipe to be deployed to general production next week, around 7/13.
In the meantime if this is causing issues, there is a workaround. You can add the following lines to the beginning of your R script:
if (exists("powerbi_rFontName")){library("showtext")
showtext.opts(dpi = powerbi_rPngDeviceDpi)
showtext.auto()
}
This should make the text appear normal size in service without affecting desktop behavior, and should not cause any issues in service once the fix is deployed.
Same here - and pretty sure it wasn't an issue a month ago when I last looked. Now my R visual looks fine on desktop, but once uploaded to the Service the font looks very small, despite whatever changes I make to the font within the plot / theme etc
Are there certain R packages that are not available on the Power BI Service perhaps? Surely not the problem here as I'm only using dplyr, ggplot2 and tidyr. Screenshots below - Desktop first, then same visual once published. Code below that.
Desktop
ggplot() +
geom_bar(data=ot1, aes(x = att, y=count,fill=score), stat="identity", position = "stack") +
geom_bar(data=ot2, aes(x = att, y=count,fill=score), stat="identity", position = "stack") +
geom_text(data =labeldata, aes(x=att,y=y, label = count), size=6, colour = "black") +
coord_flip() +
scale_x_discrete(limits= rev(levels(ot1$att)))+
theme_minimal() +
scale_fill_manual(values = c("#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"))+
xlab("Attribute")+
ylab("Count of Beneficiaries") +
ggtitle(paste("Initial Stars By Attribute (n=",totalDS, ")", sep='')) +
theme(axis.text.x=element_blank()) +
theme(plot.title=element_text(size=2
Help!
Thanks
Pete.
Sorry, managed to lose a photo in previous post - here's what the visual looks like once published...
- slado20088 years agoFrequent Visitor
Gaah! And I chopped off the end of the last line of code (maybe I enjoyed England's penalty shoot out a bit too much last night?)
Last line reads like this...
theme(plot.title=element_text(size=20))