🌍 Public
Viewing a saved revision (read-only)
06f1bc2771324ff5979109c15897dd8f
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