Skip to main content
100%

Untitled

✓ Published0🌍 Public
Mmoyaroy
Last edited Feb 21, 2021
Created on Feb 21, 2021
Forked from D3 Starter

This example demonstrates how to create a D3 band scale with a specified domain and range, then output its computed bandwidth value to the console using `d3.scaleBand()` and the `bandwidth()` method. It shows how the scale’s range width is divided evenly across five discrete domain values, resulting in a bandwidth of 2. The page is minimal, consisting only of an HTML file that loads D3 v4 from a CDN and runs the scale logic inline in a script tag. A separate JavaScript file also shows importing `select` from D3 v6 to add text to the page body.

AI-generated description

A demonstration of how to start using D3 version 6.

MIT Licensed

Similar vizzes