Skip to main content
100%

Scales and Axes

✓ Published1🌍 Public
DDonald Bagwell
Last edited Apr 10, 2024
Created on Apr 5, 2024
Forked from vizFunctionConcept

This example demonstrates a basic Cartesian coordinate system with a gray plotting area and labeled axes. It uses D3.js version 7.9.0, specifically the `d3.scaleLinear` function to map data values from 0 to 100 to pixel coordinates, and the `d3.axisBottom` and `d3.axisLeft` functions to generate the x- and y-axes. The chart is rendered inside an SVG container that is sized to fit the available width and height of the target element. The code structure uses D3’s `select` and `join` methods to create and update the SVG elements, following a declarative pattern where the visualization is defined as a function of the container’s dimensions.

AI-generated description

Creating circles with D3.

Challenge

  • Fork this example
  • Modify it
  • Maybe make it Halloween themed
  • Maybe make it Christmas themed
  • Be creative
MIT Licensed

Similar vizzes