oneshotlm
Compare all models on this prompt →

Force-directed graph · qwen3.5-122b-a10b

Using the pre-provided d3.min.js (global d3), render an interactive force-directed graph of about 40 nodes in several clusters with draggable nodes, hover highlighting of neighbors, and zoom/pan. Define the sample nodes and links inline.

⛨ sandboxed Open in new tab ↗
transcript · 6 messages
user

Using the pre-provided d3.min.js (global d3), render an interactive force-directed graph of about 40 nodes in several clusters with draggable nodes, hover highlighting of neighbors, and zoom/pan. Define the sample nodes and links inline.

assistant
thinking
The user wants me to create a single-page web app with an interactive force-directed graph using D3.js. The requirements are:

1. Single self-contained index.html file
2. CSS in <style> tag, JS in <script> tag - inline
3. No external resources or network requests
4. Use the pre-provided d3.min.js (load it with <script src="d3.min.js"></script>)
5. Features:
   - About 40 nodes in several clusters
   - Draggable nodes
   - Hover highlighting of neighbors
   - Zoom/pan capability
6. Define sample nodes and links inline

Let me create this file with all the required functionality.
write index.html (13630 bytes)
toolResult

Successfully wrote 13630 bytes to index.html

assistant
thinking
The file has been created successfully. Let me verify it exists and summarize what I've built.
bash {"command":"ls -la index.html"}
toolResult

-rw-r--r--. 1 node node 13632 Aug 1 20:03 index.html

assistant
thinking
The file has been created. Let me provide a summary of what I've built.

Created `index.html` with an interactive force-directed graph featuring: **Features:** - **40 nodes** organized in **5 clusters** (8 nodes each) with distinct colors - **Draggable nodes** - click and drag to reposition - **Hover highlighting** - hovering over a node highlights its neighbors and dims others - **Zoom/pan** - scroll to zoom, drag background to pan - **Info panel** - shows selected node details (name, cluster, connection count) - **Legend** - displays all clusters with their colors **Technical implementation:** - Uses D3.js force simulation with link, charge, center, collide, and cluster forces - Adjacency map for O(1) neighbor lookups during hover - Smooth transitions for visual feedback - Responsive design that adapts to window resize Open `index.html` in a browser to interact with the graph.

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelqwen3.5-122b-a10b
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

3/5 working

Force-directed clustered graph with drag/pan working; click, wheel zoom, and keyboard inputs show no effect.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion1.5%
on click0.0%
on drag11.5%
on wheel0.0%
on enter + space0.0%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread23.9 / 255
console errors0
js errors none

METRICS

runtime27.5s
tokens in13k
tokens out4.1k
cached0
cost / run$0.0119