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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
aQUER
New Member

Difference of R-ggplot graph between PBI-Desktop and PBI-Service

Hi, 

I've done a R visual that its working perfect in desktop:

aQUER_0-1683621001317.png

with this sentence:

ibrary(ggplot2)
library(reshape2)
dataset$rowid=seq(1,nrow(dataset))
dataset$DATA_FI=ifelse(is.na(dataset$DATA_FI), max(dataset$DATA_INI, na.rm=T), dataset$DATA_FI)
CronoM <- melt(dataset, measure.vars = c("DATA_INI", "DATA_FI"))
CronoM$data<-as.Date(CronoM$value)
CronoM= CronoM[order(CronoM$value),]

Dades=CronoM
 ggplot(Dades,
   aes(x = data, y = as.factor(SERVEI),colour = factor(DESCRIPCIO), group = rowid)) + # add group aesthetic
   geom_line(linewidth = 20) +
   labs(title = paste0 (Dades$NUM_EXPE[1],"\n" ,Dades$TITOL, "\n" ,Dades$NOM_PROCES),x = NULL, y = NULL) +
   theme_minimal()+
    theme(legend.position = "bottom",legend.title=element_blank(),    axis.text.y=element_text(size=12))
 
but when I published to service the graph has no lines:
aQUER_1-1683621192596.png

I found a post from years ago with similar trouble (same title) and I added the sentences they found that fixed the problem:

if (exists("powerbi_rFontName")){
  library("showtext")
  showtext.opts(dpi = powerbi_rPngDeviceDpi)
  showtext.auto()
}
 
but that not's working for me...
It's my first time doing R visuals in PowerBi... any help will be appreciated!
thanks!
 
1 REPLY 1
aQUER
New Member

any idea?

I changed geom_line by geom_points and they are visible...

Why I can't see lines? any suggestion?

 

many thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.