Test
✓ Published0🌍 Public
GGerHobbelt
Last edited Sep 9, 2012
Created on Sep 8, 2012
This example shows a single rectangle positioned on a logarithmic scale, with axes using custom tick formatting that hides most labels. The SVG chart is 200 by 200 pixels and uses D3.js to create log scales for both X and Y axes, mapping data points from a one-element array. The code demonstrates how to correctly calculate rectangle position and size when scales are non-linear, using `Math.min` and `Math.max` to flip coordinates and ensure positive width and height. The `d3.svg.axis` API renders the axes, while CSS styles the axis text and lines.
AI-generated description