Skip to main content
100%

Legend Practice

✓ Published0🌍 Public
MMichaelBGonzalez
Last edited Dec 13, 2021
Created on Dec 10, 2021
Forked from Hello VizHub

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 description

An example showing the capabilities of VizHub:

  • Loads D3 via UNPKG.
  • Demonstrates use of import from "d3".
  • Demonstrates use of import from local ES6 modules.
MIT Licensed

Similar vizzes