🌍 Public
Viewing a saved revision (read-only)
4f734a0bbb10489fa6c82d0688965e84
Self-Modifying Code
This interactive visualization displays seven colorful circles of varying sizes and positions on a light green canvas. Clicking a circle selects it, highlighting it with a black stroke and full opacity, while clicking again deselects it. The selection state is persisted to a CSV file via VizHub’s `writeFile` API, and the visualization reads that state from `selectedIndex.csv` on each render. The code uses D3’s `select` and `csvFormat` functions to manage SVG rendering and data serialization, with the click handler writing the updated selection back to the file.
AI-generated descriptionAn example of self-modifying code using VizHub's writeFile
API.