Skip to content

Highlight Y-Axis Accuracy is  #1238

@s-heap

Description

@s-heap

Using the highlight to add box dragging to your graph results in just inaccurate y-Axis area selection.

This can be seen in the documentation itself:
https://uber.github.io/react-vis/documentation/api-reference/brushing-and-dragging
ReactVisBugPreZoom

ReactVisBugPostZoom

As can be seen although I clearly selected a box between 0 and 20 on the y-axis, the recorded area is actually between -1.18 and 18.86. This difference has been causing me issues with higher fidelity data since I cannot accurately select the data I wish to view.

This lack of accuracy only occurs in the y-axis and in the x-axis the accuracy is far more acceptable.

Update:

I have found that the issue occurs due to the system taking into account the XYPlot's margin when calculating things like the drag location. This also effects the accuracy of the voronoi component. Since the default margin on a plot is {left: 40, right: 10, top: 10, bottom: 40} this meant I had to manually set the margin to 0.
As of now I am still unsure as to where or why the margin is taken into account and how it effects the calculation

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