How to change white border color around plotly spike lines

Viewed 567

Is there a way to get rid of the following unexpected white border around the spikelines ? This issue arises when the plot is placed over a dark background.

I've seen that this is an open issue, but I was wondering if this is something that can somehow be modified using css.

Code :

library(shiny)
library(plotly)

ui <- fluidPage(
  fluidRow(style = "background-color:#000000;",
           plotlyOutput(outputId = "myplot")
  )
)

server <- function(input, output) {

  output$myplot <- renderPlotly({

    mydata <- data.frame(x = rnorm(10), y = rnorm(10))

    fig <- plot_ly(data = mydata, x = ~x, y = ~y) %>%
             layout(hovermode = "solid",
                    xaxis = list(showspikes=TRUE, spikethickness = 2),
                    paper_bgcolor = "transparent",  # Looks ok if set to "black"
                    plot_bgcolor = "transparent")
  })
}

shinyApp(ui = ui, server = server)

The border :

enter image description here

0 Answers
Related