Skip to content

legend is cut on scatter plot plotly / ggplot2 / shiny #635

Closed
@poijqwef

Description

@poijqwef

The legend is cut when plotly is applied to ggplot2 within shiny.
Any suggestion?

legend-cut

Here is the code I am using:

server:

output$timeSeries <- renderPlotly({ df <- timeSeriesPriceData() gplot <- ggplot() + geom_line(data=df,aes(x=datetime,y=price,colour="price")) + scale_colour_manual(values=c("blue")) + theme(legend.position="left") g <- ggplotly(p=gplot,showlegend=TRUE) })
ui:

plotlyOutput("timeSeries"),

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