Skip to content

Temporal tickFormat for facet reported as invalid if dataset is empty #2231

Closed
@mootari

Description

@mootari

If a plot defines a temporal tickFormat like %W for a facet, and the dataset is empty, then rendering the Plot will fail with the error:

Error: invalid format: %W

Example:

Plot.barY([], {fy: d => d}).plot({fy: {tickFormat: "%W"}})

For comparison:

Plot.barY([new Date()], {fy: d => d}).plot({fy: {tickFormat: "%W"}})

Metadata

Metadata

Assignees

Labels

bugSomething isn’t working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions