Fork of Hello VizHub
✓ Published4🌍 Public
This example demonstrates how to set up a minimal D3.js visualization inside the VizHub runtime environment. It renders the text “Hello VizHub!” centered in the page by using the D3 selection API, specifically `d3.select` to target a div and set its text content. The code loads D3 v6 from UNPKG as a UMD script, while also importing local ES6 modules, including a custom message exported from a separate `myMessage.js` file. Styling is applied through an external CSS file that controls the font size and alignment.
AI-generated descriptionAn example showing the capabilities of VizHub:
- Loads D3 via UNPKG (pinned at v6, since this runtime environment only supports UMD, and in v7 D3 dropped UMD support)
- Demonstrates use of
importfrom"d3". - Demonstrates use of
importfrom local ES6 modules.
MIT Licensed