Activity 6
✓ Published0🌍 Public
This example demonstrates a minimal setup for integrating D3.js with ES6 modules in VizHub. It displays a large, centered “Hello VizHub!” message by dynamically setting the text content of an HTML element. The code imports the `select` function from D3 via UNPKG, and imports a local ES6 module exporting the message string. It uses D3’s `select` and the `text` method to update the targeted div, with styling applied through an external CSS file. The example illustrates basic module imports, CDN loading, and DOM manipulation with D3.
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