Activity 6
✓ Published0🌍 Public
This example demonstrates how to combine D3.js with ES6 modules in a VizHub project. It imports the `select` function from D3 and a custom local module called `message.js` to display the text “Hello VizHub!” centered on the page. The code uses `d3.select` to target the `#message` div and sets its text content, with styling applied via an external CSS file. The example also includes a regular expression and a constant variable to illustrate additional JavaScript syntax, though these do not affect the visual output.
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