Skip to content

Add option to minimize generated html file #150

Closed
@qarmin

Description

@qarmin

Currently when using plot.to_html(), generated file is really big for big amount of data(my app can generate few plots with several thousands of points).

I found that removing unnecessary new lines and empty points can decrease size of plot by ~30%

I tried to use html/js minifier, but it doesn't work, so I wrote simple regex which do almost same thing

    let mut html = plot.to_html();
    let regex = Regex::new(r"\n[ ]+").unwrap();
    let html = regex.replace_all(&html, "");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions