Skip to content

Axis: inaccurate GetCoordinateY() conversion #1625

@swharden

Description

@swharden

When using converting to pixel with GetPixelY() then back to coordinate with GetCoordinateY() does not result in the same number

The error is here:

public double GetCoordinateY(float pixel) => DataHeight - ((pixel - YMin) * PxPerUnitY);

@BambOoxX pointed-out in #1616 this should be:

public double GetCoordinateY(float pixel) => YMax - (pixel - DataOffsetY) / PxPerUnitY;

Metadata

Metadata

Assignees

Labels

BUGunexpected behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions