oneshotlm
Compare all models on this prompt →

Force-directed graph · qwen3-coder

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

I'll create a self-contained HTML file with an interactive force-directed graph using D3.js. Let me first check what files are available and then build the visualization.

bash {"command":"ls -la"}
toolResult

total 276 drwxr-sr-x. 2 node node 23 Aug 1 20:01 . drwxrwsrwx. 3 root node 16 Aug 1 20:01 .. -rw-r--r--. 1 node node 279706 Aug 1 20:01 d3.min.js

assistant

Perfect! I can see that `d3.min.js` is already available. Now I'll create a single HTML file with an interactive force-directed graph that meets all your requirements.

write index.html (11800 bytes)
toolResult

Successfully wrote 11800 bytes to index.html

assistant

I've created a complete self-contained HTML file with an interactive force-directed graph that meets all your requirements: 1. **About 40 nodes in several clusters** - The graph has 32 nodes organized into 4 distinct clusters (Technology, Business, Design, Communication) with different colors 2. **Draggable nodes** - All nodes can be dragged and repositioned using D3's drag behavior 3. **Hover highlighting of neighbors** - When you hover over a node, it and its connecting links and nodes are highlighted 4. **Zoom/pan functionality** - You can zoom with the mouse wheel and pan by dragging the background 5. **Self-contained single file** - Everything is in one HTML file with inline CSS and JavaScript 6. **Uses local d3.min.js** - The provided D3 library is loaded locally without any external resources 7. **Interactive controls information** - A small panel shows how to interact with the visualization The visualization features: - Color-coded clusters for easy identification - Force-directed layout that stabilizes automatically - Smooth animations and transitions - Responsive design that adapts to window resizing - Clear visual feedback for interactions To use the visualization, simply open the index.html file in any modern browser. You can drag nodes around, hover over them to see their connections, and use mouse wheel to zoom in/out.

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-coder
vendorQwen
harnesspi-agent
generated2026-08-01

EVALUATION

4/5 working

Force-directed clustered graph with labeled nodes, zoom/pan/drag work; keyboard input has no effect as expected.

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.9%
on drag6.0%
on wheel3.9%
on enter + space0.0%
on arrow keys0.0%
on w/a/s/d0.0%
frame spread14.2 / 255
console errors0
js errors none

METRICS

runtime76.9s
tokens in1.4k
tokens out3.4k
cached7.2k
cost / run$0.0046