Skip to contents

plotly ignores the Bootstrap theme, so the backgrounds are made transparent and the text and grid colors are switched to suit the mode, on every axis of a chart with several panels.

Usage

plot_theme(p, mode)

Arguments

p

A plotly object.

mode

"light" or "dark", the value of the dark mode toggle.

Value

The plotly object p, with its layout changed.

Examples

p <- plotly::plot_ly(x = 1:3, y = c(2, 1, 3), type = "scatter", mode = "lines")
crypto:::plot_theme(p, "dark")