Skip to main content
100%

Tutorial3.2

✓ Published0🌍 Public
Vvaishalireddy55555@gmail.com
Last edited Apr 15, 2024
Created on Apr 15, 2024
Forked from Hello VizHub

This example shows an interactive scatter plot of the Iris dataset, encoding species as symbol shapes and displaying a custom shape legend. It demonstrates modular D3 v7 code organization, with separate ES6 modules for axes, scatter plot rendering, and legend construction. The visualization uses D3 scales (scaleLinear, scaleOrdinal), symbol generators, and CSV data loading from a GitHub gist. The code also highlights VizHub’s pattern of state management and re-rendering through a setState function, alongside dynamic SVG resizing to the window.

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