🌍 Public
Viewing a saved revision (read-only)
6a24b6257603456fabcbd26e18dd614c
Scale & Axes
This example demonstrates the fundamental role of scales and axes in D3 data visualization. A gray plotting area is framed by a linear x-axis and y-axis, both spanning a domain from 0 to 100. The code uses `d3.scaleLinear` to map data values to screen coordinates, with `axisLeft` and `axisBottom` from D3 to render the ticks and labels. Margins are explicitly calculated to position the axes and the inner chart area, while the axes module manages the axis generation and text labels.
AI-generated description