d3 axis
✓ Published1🌍 Public
This example shows a simple bar chart with a bottom axis, where each green rectangle’s width corresponds to a value in a static array. The chart uses d3.axisBottom with a d3.scaleLinear to map data values to pixel widths, and the axis is positioned below the bars via a margin offset. Rendering is done in SVG, with rectangles and the axis group appended to the root svg element. The code explicitly calls the axis generator with .call(xAxis) to draw ticks and labels.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed