Skip to main content
100%

Classical Scales

✓ Published0🌍 Public
GGerHobbelt
Last edited Sep 10, 2012
Created on Sep 2, 2012

This example showcases a series of classical axis configurations built with the D3.js v2 library, highlighting its advanced axis component. It demonstrates various scale types—linear, logarithmic, power, square-root, quantile, quantize, threshold, and identity—each paired with different domain ranges and tick subdivision settings. The visualization animates through these axes, each labeled with a description, and includes SVG rendering with custom filters and styling. The code is derived from Ger Hobbelt’s enhanced d3.axes component, with related gists for vanilla D3 compatibility.

AI-generated description

D3.js Axes …… <a href="http://bl.ocks.org/3605035" title="view this gist via bl.ocks.org">∆</a> <a href="http://bl.ocks.org/GerHobbelt" title="view a list of all my gists at bl.ocks.org">∞</a>

This is a copy of Ger Hobbelt's examples/axis/axis-classical.html.

The 'classical' axes showcase the augmented d3.axes component in https://github.com/GerHobbelt/d3

To see the same axes (rendered differently as vanilla D3 doesn't support functions for subtick count, etc. in its d3.axis component (at least as per v2.10.0 release), view:

  • same code, with crash protection wrappers, for vanilla D3.js: gist 3605069
  • reduced code wuitable for use with vanilla D3.js as is, with crash protection wrappers: gist 3605124

Related gists

  • gist 3605035: a series of linear axes with varying degress of sophistication, using the advanced d3.axis component
  • gist 3605069: same code, with crash protection wrappers, for vanilla D3.js (use to see how many of these vanilla D3.js supports today)
  • gist 3605124: reduced code suitable for use with vanilla D3.js v2.10 as is, with crash protection wrappers

Similar vizzes