🌍 Public
Viewing a saved revision (read-only)
ab00c5fbbc41463bb30d2937b12e2f55
Untitled
This example demonstrates how to format numbers with D3’s `d3.format` API from the `d3-format.v2` module. It creates two format specifications—a compact two-significant-digit format and a centered width-20 format—and outputs the results of formatting the number 12347 with each to the console. The code loads the D3 library from a CDN and executes the formatting calls directly in a script tag, showing the formatted strings as the primary output.
AI-generated descriptionA demonstration of how to start using D3 version 6.