🌍 Public
Activity9-T1
This example demonstrates a minimal D3.js setup within the VizHub environment, showing how to import modules and render text to the DOM. The code uses the `select` function from D3 v5 to target a `div` element and set its content, pulling the string ‘Hello VizHub!’ from a local ES6 module named `myMessage.` It also defines a regular expression and a numeric constant, though these are not used for visualization. Styling is applied via external CSS, and the page loads D3 from UNPKG, with the main script bundled into `index.html.`
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG.
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed
Comments
Sign in to join the discussion.