Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
peiann_ee
New Member

R visual - responsive visualization in power BI

I had created some visualizations using R visual and pin it on my Power BI dashboard.

The font size was responsive to the tile size that i set.

However, since yesterday (28.06.2018), the font became exstremly small until unreadable after report refresh.

No matter how i adjust my font size in R script, and how big the font looks in Power BI desktop, it still show tiny font in my power BI dashboard.

 

May i know how to solve this issue? How to make the visualization responsive to the tile size in power bi?

Thanks. 

 

1 ACCEPTED SOLUTION
LucasPritz
New Member

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.

View solution in original post

8 REPLIES 8
LucasPritz
New Member

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.

slado2008
Frequent Visitor

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.

DesktopDesktop

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.

Anonymous
Not applicable

Similar to your script, I have used the coord_flip() function. My visual works perfect when my plot is vertical. When I use the coord_flip() to rotate my visual, the plot rotates but the rendering looks weird. Any idea?

Anonymous
Not applicable

My problem was just the label font being too small once published, which the suggested fix sorted out. Hard to say based on "rendering looks weird" but sounds like you have some other problem not related to the one raised here.

Sorry, managed to lose a photo in previous post - here's what the visual looks like once published...

PBI Service font.GIF

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))

Anonymous
Not applicable

I had similiar issue with the R visual lable after published to the server, it is shown corrected in the desk top, but after I published to the server, the lable text shown each single word as 90 degree, but the whole lable to the angel been set (screen shot as 45 degree). Not sure if there is any changes in the server site. Can some one please help to check. 

 

 

desktop as Power BI DeskTop.PNG

 

 

 

publish to server as

PowerBi Services 2.png

Exactly what i am facing now. Hope someone can answer.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors