0

I am having below R code. when I am plotting this in power BI desktop it is working fine as Reason col is coming as category. When I am publishing same in power BI service, Reason is converted into the number and date col is also changed. attached screen shot for reference.enter image description here

    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');
    ####################################################

here is the data I have .

    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
Andrew D
  • 37
  • 6
  • Hi Andrew. It's not clear how you would like us to help you. For some reason the data you have is displaying in a different way than you would like, but we don't have your data (or a reproducible sample of it), so how is it you think we can help you from just what you've included in your question? Maybe if you edit your question to include the output of `dput(dataset)` (or `dput(head(dataset))` we might then have enough information to fix your problem? – Allan Cameron Dec 07 '20 at 12:46
  • Thanks Allan. I added more information now. – Andrew D Dec 08 '20 at 00:02

0 Answers0