Skip to main content
100%

plying_with_d3

✓ Published0🌍 Public
AAgoujil2saad
Last edited Jan 15, 2018
Created on Jan 15, 2018

This example demonstrates a simple bar chart built with D3.js, where each bar’s height corresponds to a value from a hardcoded array. It shows how to bind data to SVG rectangles and position them using index-based x-coordinates. The code uses D3 v4’s `d3.select` and chained `attr` methods to set each rectangle’s dimensions, fill color, and white stroke. The bars are vertically anchored from the bottom by subtracting each value from a fixed height. No axes, scales, or transitions are included, making it a minimal introduction to D3’s data-joining and SVG rendering.

AI-generated description
<h3>just playing around with d3.js</h3>
mit Licensed

Similar vizzes