Skip to content

Unicode characters break saving to file #13

@ConnectedSystems

Description

@ConnectedSystems

Principally, 4 spaces / tabs seem to be inserted at various points in the saved HTML for some reason, breaking the JavaScript.
Similarly, saving the alternate file formats also do not work - I think something is breaking the spec.

The attached zip file contains the data needed to reproduce the issue and the resulting html.
The example data includes "€" in one of the columns.

using CSV, DataFrames
using Deneb

reprod = CSV.read("example_data.csv", DataFrame)

m_count = Data(reprod) * Mark(:bar) * Encoding(
              x=(field=:year, title="Year"),
              y=(aggregate=:count, type=:quantitative, title="Count"),
              color=(field=:col1, title="Type")
          ) * title("Reproduce Issue")

# Membership revenue
m_revenue = Data(reprod) * Mark(:bar) * Encoding(
                x=(field=:year, title="Year"),
                y=(field=:col2, title="Total", aggregate=:sum, type=:quantitative),
                color=(field=:col1, title="Type")
            ) * title("Reproduce Issue")

Deneb.save("reproduced.html", [m_count m_revenue])

reproduced.zip

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