Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

D3 Scale - Sqrt

Public visualization

D3 Scale - Sqrt

0 stars1🌍 Public
SSubhendu Karmakar
Last edited Dec 26, 2023
Created on Dec 26, 2023

This example compares linear and square-root scales for encoding data as circle radii. Two rows of circles, one red and one green, map the same dataset from 0 to 100 using D3's `d3.scaleLinear` and `d3.scaleSqrt`. The linear scale positions circles along the x-axis, while its radius is scaled for visual clarity. The square-root scale directly maps the data to the radius, ensuring that the circle's area, rather than its diameter, is proportional to the value. The SVG output includes an annotation recommending square-root scaling for area-based encodings.

AI-generated description

D3 Scales

Comments

Sign in to join the discussion.

MIT Licensed