Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved hover detection for scatter plot fill tonext* #6865

Merged
merged 6 commits into from
Jan 30, 2024

Commits on Jan 23, 2024

  1. Added tests for hoveron fills to scatter jasmine test suite.

    The tests rely on scatter mocks `scatter_fill_self_next`
    and `scatter_fill_corner_cases` and test for a number of points
    that are currently not correctly detected when hovered over
    for tonexty and tozeroy fills.
    lumip committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    407bcf2 View commit details
    Browse the repository at this point in the history
  2. Fix for hover behavior on scatter fills tonextx/y.

    Previous code would not correctly construct the polygons
    used for detection whether the cursor is within the fill
    region of a trace.
    
    Some of the previously created tests fail with this as the
    hover points in question cannot currently be correctly
    detected using the detection polygons.
    lumip committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    52bf7c8 View commit details
    Browse the repository at this point in the history
  3. Using SVGElement.isPointInFill instead of custom polygons for hover t…

    …ests in scatter plots.
    
    However, SVGElement does not allow for an easy way to determine the positioning of
    the hover label, so the polygons are still in use for that.
    lumip committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    5ba718f View commit details
    Browse the repository at this point in the history
  4. Display hover label at cursor position as fallback for scatter traces.

    For curved edges of fills there is a chance that the hover detection polygons miss a point and the correct hover label position cannot
    be determined. Previous code fell back to positioning the label
    at the largest edge of any polygon of the trace of their combined
    vertical midpoint, with undetermined behaviour if no polygon
    overlapped the midpoint.
    This change instead falls back to simply displaying the label at the
    current cursor position, which simplifies code and results in less
    confusing label placement.
    lumip committed Jan 23, 2024
    Configuration menu
    Copy the full SHA
    6f8ca1e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    889b6c6 View commit details
    Browse the repository at this point in the history

Commits on Jan 27, 2024

  1. Mention contributor in draftlogs/6865_fix.md

    Co-authored-by: Mojtaba Samimi <[email protected]>
    lumip and archmoj authored Jan 27, 2024
    Configuration menu
    Copy the full SHA
    af0af9c View commit details
    Browse the repository at this point in the history