plotly / plotly.rs

Plotly for Rust

Home Page:https://docs.rs/plotly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generated html file with dark plot should also have dark background

qarmin opened this issue · comments

Currently using

layout.template(&*PLOTLY_DARK);

will change color of plot, but not rest of the page.
As workaround i manually background color

    let mut html = plot.to_html();
    if !settings.white_plot_mode {
        html = html.replace("<head>", "<head><style>body {background-color: #111111;color: white;}</style>");
    }

I'll have to check what the exact behaviour is with the Python/JavaScript implementations, as I tend to base all decisions like this one on what the canonical libraries do.