
Remove Focus Outline from Linechart in Plotly (Shiny)
Source:R/ro_ply_focus_linechart.R
ro_ply_focus_linechart.RdDetails
Adds custom CSS to your Shiny app to remove the outline and box-shadow that appear when lines in a Plotly linechart receive focus (via keyboard navigation). This improves the visual appearance for certain use-cases, but be aware that it may affect accessibility for keyboard users.
See also
Other plotly:
ro_ply_add_theme(),
ro_ply_cursor(),
ro_ply_dim(),
ro_ply_disable_toolbar(),
ro_ply_keyboard_nav_barchart(),
ro_ply_keyboard_nav_bargraph(),
ro_ply_keyboard_nav_legend(),
ro_ply_keyboard_nav_linechart(),
ro_ply_keyboard_nav_trendline(),
ro_ply_legend_theme(),
ro_ply_theme(),
ro_ply_title()
Examples
if (interactive()) {
ui <- fluidPage(
ro_ply_focus_linechart(),
plotlyOutput("myplot")
)
server <- function(input, output, session) {
output$myplot <- renderPlotly({
plot_ly(x = 1:10, y = rnorm(10), type = "scatter", mode = "lines")
})
}
}