Activity 8
✓ Published0🌍 Public
This example demonstrates a minimal D3.js v5 setup within VizHub, replacing the contents of a div with a static text message. It shows how to load D3 from a CDN, import functions like `select` directly from the `d3` module, and import a local ES6 module that exports a string constant. The rendered output is a single, large, centered “Hello VizHub!” message, styled via a linked CSS file. The code uses `select('#message').text(message)` to set the DOM content, highlighting basic module imports and DOM manipulation without any data or animation.
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