Skip to main content
100%

Making a bar Chart with D3.js!

✓ Published0🌍 Public
TTomisin Owolabi
Last edited Apr 11, 2020
Created on Apr 11, 2020

This example shows a blank SVG canvas with a fixed width and height, ready for drawing a bar chart. The code imports the `select` function from D3.js and uses it to grab the SVG element, then reads its dimensions via `attr`. The dataset and rendering logic are not yet implemented, leaving the visualization as an empty stage. It uses D3 v5 and renders through SVG, with a minimal stylesheet that removes body margins and hides overflow.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.

MIT Licensed

Similar vizzes