Skip to content

Empty facet domain causes rendering errors #1856

Closed
@mbostock

Description

@mbostock

Looks like we don’t handle this case very gracefully:

untitled (82)

Plot.rectY([], { x: "date", y: "visitors", fy: "path" }).plot()

From the console:

Error: <svg> attribute height: Expected length, "NaN".
Error: <svg> attribute viewBox: Expected number, "0 0 640 NaN".
Error: <text> attribute transform: Trailing garbage, "translate(600,NaN) rotate(-90)".
Error: <text> attribute transform: Trailing garbage, "translate(40,undefined)".
Error: <text> attribute transform: Trailing garbage, "translate(600,NaN)".

Metadata

Metadata

Assignees

No one assigned

    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