Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Bind data to html with d3

Public visualization

Viewing a saved revision (read-only)

893f0ce520af47df9c5cee1d73d541dd

Bind data to html with d3

0 stars0🌍 Public
NNathan Neelis
Last edited Nov 9, 2020
Created on Nov 9, 2020

This example visualizes eye color data by binding a JSON dataset to SVG circles, each positioned sequentially along the x-axis and colored according to a validated hex color value. The code loads data with `d3.json`, filters invalid colors using a regex, parses hex values into RGB components, and sorts the data before rendering. It demonstrates basic data joins with `svg.selectAll().data().enter().append()` without using scales, keeping circle positions and radii fixed.

AI-generated description

Bind data to HTML using d3

This is a basic example that doesn't use scales