Legend Practice
✓ Published0🌍 Public
This example generates a custom legend that maps network node and edge types to specific colors for a COVID-19 contact tracing visualization. It uses D3.js (v5) to append SVG `circle` and `text` elements within an SVG container, iterating over a JavaScript `Map` of record types. The legend lists entries like "COVID-19 Case" and "household__c," with colors defined programmatically. The code also sets the page background to black and loads libraries via UNPKG.
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