Skip to content

Rangemode tozero has odd behavior with only negative points in scatter plot #798

Closed
@mboorstin

Description

@mboorstin

Repro cases: http://codepen.io/anon/pen/QEBOzQ

I've encountered two odd behaviors when a scatter plot with an axis set to rangemode: 'tozero' has only negative data points. If there is only a single data point, the axis direction will be reversed and the inital range won't go all the way to the point (it looks like it's 1 unit away from the point; you can scroll to find the point at the correct coordinates). If there are multiple data points, the axis direction will be correct and both points will be within the initial range, but the initial range won't go to zero. I've included examples of these as the first and second graphs in the Codepen. I've also included examples of bar charts as the third and fourth graphs to show what I think is the correct behavior.

If this is indeed a bug I'm happy to work on a patch to fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions