Skip to content

Difficult debugging on invalid scale.range arguments #267

@Stan-Stani

Description

@Stan-Stani

I accidentally wrote

yScale.range([height - padding, padding]);
as
yScale.range([height - padding], padding);

No error was thrown and it took me a long time to figure out why my yScale was returning undefined on all inputs.

Could we make scale.range throw an error when more than one argument is present and/or when a scale can't be generated from the given 1st parameter?

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