Skip to main content
100%

Fork of Hello VizHub

✓ Published0🌍 Public
HHannah Zong
Last edited Jul 7, 2024
Created on Jul 6, 2024
Forked from Hello VizHub

This example demonstrates a simple animated visualization of fifteen circles moving horizontally across an SVG canvas. Each circle’s vertical position follows a sine wave, creating a wavy pattern that updates every second. The code imports `select` and `range` from D3 v5, builds the SVG with `select('body').append('svg')`, and uses `setInterval` with the `.join('circle')` operation to update the circle positions. The data for each frame is generated on the fly with `range(15).map(...)`, and `console.log` outputs the sine value. The rendering is SVG-based with no external data source.

AI-generated description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes