Skip to content

Bug with Date Format in plotly on LINUX from ggplot conversion to PLOTLY #482

Closed
@ahsanshah

Description

@ahsanshah

I moved my code from Windows to Linux R/Shiny server and I noticed that the same exact code that displays the proper DATE format in Windows shows as a different Date Time format on Linux. It seems that when I convert the ggplot to PLOTLY using ggplotly(), it behaves differently with the Date format than in Windows.

Here is the sample code:

p1 <- ggplot() + geom_smooth(
method = gam,
formula = y ~ s(x,bs="cc",k=12),
data = test2 ,
aes(x = DT_STAY_DATE, y = test2[, input$yvar_p] , color = PROPERTY_NAME)
) + ylab(input$yvar_p)

ggplotly(p1)

I moved my code from Windows to Linux R/Shiny server and I noticed that the same exact code that displays the proper DATE format in Windows shows as a different Date Time format on Linux. It seems that when I convert the ggplot to PLOTLY using ggplotly(), it behaves differently with the Date format than in Windows.

Here is the sample code:

p1 <- ggplot() + geom_smooth(
method = gam,
formula = y ~ s(x,bs="cc",k=12),
data = test2 ,
aes(x = DT_STAY_DATE, y = test2[, input$yvar_p] , color = PROPERTY_NAME)
) + ylab(input$yvar_p)

ggplotly(p1)

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions