🌍 Public
Viewing a saved revision (read-only)
644317b869bf448ab79095830414eccd
D3 Axes - Configuration
This example demonstrates how to configure a D3 axis by explicitly setting tick values. A linear scale maps a domain of 0 to 100 to a range of 0 to 500 pixels, and an axis is generated using `d3.axisBottom(scale)`. The code calls `.tickValues([0, 25, 50, 75, 100])` to control which values appear as ticks, overriding the default tick generation. The axis is rendered into an SVG `<g>` element using `d3.select('svg g').call(axis)`, producing a clean, labeled horizontal axis.
AI-generated description