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