Fix: Scatter plot zoom and 'Show all labels' not working

#29
OpenHands org

Summary

This PR fixes the scatter plot functionality in the OpenHands Index leaderboard 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

The fix synchronizes leaderboard_transformer.py from the staging branch which correctly:

  1. Uses data coordinates (xref="x", yref="y") instead of domain coordinates (xref="x domain", yref="y domain") for logo placement so they zoom/pan correctly with the chart
  2. Implements the show_all_labels parameter properly to show labels for all data points when enabled

Files Changed

  • leaderboard_transformer.py: Fixed scatter plot zoom behavior and show_all_labels functionality

This was tested on openhands-index-staging space and is ready to be merged to main.

OpenHands org

Summary of Changes

This PR contains the fix for the scatter plot functionality:

Changes Made:

The file leaderboard_transformer.py has been updated to fix two issues:

  1. Zoom functionality - Changed logo/icon positioning from domain coordinates (xref="x domain", yref="y domain") to data coordinates (xref="x", yref="y") so they zoom/pan correctly with the chart

  2. 'Show all labels' toggle - The show_all_labels parameter now properly shows labels for all data points when enabled (not just Pareto frontier points)

Technical Details:

  • Line 1309-1343: Added if show_all_labels: block to show labels for all points
  • Line 1279-1305: Changed from xref="x domain" to xref="x" for proper zoom behavior

How to Test:

  1. Go to https://huggingface.co/spaces/OpenHands/openhands-index-staging
  2. Zoom in on a scatter plot - logos should zoom/pan with the chart
  3. Toggle 'Show all labels' - all labels should appear when enabled

The fix is ready to be merged to main.

OpenHands org

Closing this empty PR. The fix has been committed to the fix-scatter-plot-labels-zoom branch. See the branch commits for the actual fix.

OpenHands org

Closing this empty PR. The fix has been committed to the fix-scatter-plot-labels-zoom branch.

juan-all-hands changed pull request status to closed

Sign up or log in to comment