Fix scatter plot: zoom and show_all_labels for all labels not just frontier

#32
OpenHands org
No description provided.
OpenHands org

Summary

This PR fixes the scatter plot functionality where:

  1. Zoom not working - Logo icons were using domain coordinates instead of data coordinates, causing them to not zoom/pan with the chart
  2. 'Show all labels' not working - Labels were only shown for Pareto frontier points even when 'Show all labels' was enabled

Changes in leaderboard_transformer.py:

Fix 1: Proper zoom behavior

Changed from:

xref="x domain", yref="y domain"  # Fixed position - doesn't zoom with chart

To:

xref="x", yref="y"  # Data coordinates - zooms/pans with chart

Fix 2: Show all labels functionality

Added if show_all_labels: block at line 1309-1325 to show labels for all data points when enabled (not just Pareto frontier).

Testing

The fix was developed and tested on the staging space:
https://huggingface.co/spaces/OpenHands/openhands-index-staging

The branch swe/fix-scatter-zoom contains the same fixed code.

Merge Instructions

To merge this PR, either:

  1. Click "Merge" on the PR page if you have permissions, or
  2. Merge locally using:
    git fetch origin swe/fix-scatter-zoom
    git merge origin/swe/fix-scatter-zoom
    git push origin main
    
juan-all-hands changed pull request status to merged

Sign up or log in to comment