Skip to content

Vega-Lite writer: DateTime / Time binned facet strips never match, so the labels never apply #518

Description

@thomasp85

build_binned_facet_label_expr builds its strip labels as a Vega expression comparing datum.value against a midpoint string produced by calculate_midpoint_string (src/writer/vegalite/mod.rs:879). For the temporal arms — Date, DateTime, Time — that midpoint is emitted as a quoted ISO string ('1973-06-25T00:00:00'), which never equals the serialized facet column value at runtime. No condition ever fires, so the strips fall through to datum.value and show raw values instead of the bin range.

The hephaestus writer computes the same labels from typed values (scales::bin_at_centre, joining the column's bin centre back to its bin) and is correct — that is the behaviour to match.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions