Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Making a Bar Chart

0 stars0🌍 Public
Mmeghagoyal17
Last edited Apr 12, 2023
Created on Apr 12, 2023
Forked from HTML Starter

This example displays a bar chart of four individuals’ scores, with blue bars representing values on a scale from 0 to 100. It uses D3 v7 to create an SVG graphic, employing the `d3.select` method to append the chart to the page, `d3.scaleBand` and `d3.scaleLinear` to map data to x and y coordinates, and the `join` operation to bind each data point to a rectangle element. The chart’s dimensions and margins are fixed, and the data is hard-coded in the script.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed