Skip to main content
100%

Fork of Scales and Axes

✓ Published0🌍 Public
DDuc Pham
Last edited Feb 6, 2024
Created on Feb 6, 2024
Forked from Scales and Axes

This example demonstrates D3 scales and axes by rendering a blank chart with a gray inner rectangle and labeled x and y axes. It uses `d3.scaleLinear` to map input data from 0 to 100 into pixel coordinates, with margins defining the plot area. The axes are created using `d3.axisBottom` and `d3.axisLeft`, which are appended to SVG groups and positioned via margin-based transforms. The code imports from the D3 v7 library and dynamically sizes the SVG to its container.

AI-generated description

Preparing for visualization with D3 scales and axes!

MIT Licensed

Similar vizzes