Activity 7
✓ Published0🌍 Public
This example demonstrates basic D3.js and ES6 module integration within a VizHub project. It renders a single centered text message, "Hello VizHub!", inside an HTML div element using the `select` function from D3 v5. The code imports the text from a local ES6 module (`myMessage.js`) and applies styling through an external CSS file. The page loads D3 from a CDN via UNPKG, while the main script uses `import` statements to combine D3’s selection API with custom local module code.
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