Forum Discussion

Rohit_PBI's avatar
Rohit_PBI
New Member
5 years ago

Axis are not displaying properly in Power BI services for HTML R Custom visual

Hi All,

 

We have built a HTML R Custom visual. This componet is working fine in the Power BI desktop, however same componet get messed up in axis when we publish it to the Power BI service. 

 

Please have a look at following screen shot. We have same problem in all the components which are in the production app. Looks like problem started after last update of Power BI service in Nov 2020.

Sample R HTML code


source('./r_files/flatten_HTML.r')

############### Library Declarations ###############
libraryRequireInstall("ggplot2");
libraryRequireInstall("plotly");
libraryRequireInstall("XML");
libraryRequireInstall("dplyr");
libraryRequireInstall("reshape2")


####################################################

dataset <- Values
g<-ggplot(data = dataset, aes(x=as.Date(Date), y=Reason, label = Time ))

####################################################

############# Create and save widget ###############
p = ggplotly(g);
internalSaveWidget(p, 'out.html');
####################################################

 

Sample data

Time ShortName Reason Date
D Response to 31/05/2019 0:00
31 D Issued 15/04/2019 0:00
D Return 12/06/2019 0:00
B Return 9/11/2018 0:00
C Return 11/02/2019 0:00
C Return 13/03/2019 0:00
D Return 2/07/2019 0:00
A Return 23/09/2019 0:00
D Response to 20/06/2019 0:00
10 D Return 11/06/2019 0:00
21 D Return 2/05/2019 0:00
54 A Return 8/07/2019 0:00
1 A Issued Outside 5/07/2019 0:00
1 A Issued Outside 20/09/2019 0:00
5 D Response to 25/06/2019 0:00
6 D Response to 31/05/2019 0:00
9 C Issued 29/01/2019 0:00
10 D Issued 15/04/2019 0:00
A Issued Outside 20/09/2019 0:00
D Response to 31/05/2019 0:00
10 D Issued 15/04/2019 0:00
55 A Issued Outside 5/07/2019 0:00

 

2 Replies