Skip to main content
100%

Self-Modifying Code

✓ Published4🌍 Public
CCurran Kelleher
Last edited Sep 26, 2025
Created on Jul 20, 2024
Forked from Circles with D3

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 description

An example of self-modifying code using VizHub's writeFile API.

MIT Licensed

Similar vizzes