Skip to main content
Public

Share visualization

Loading preview…

Fork of Making a Bar Chart

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Making a Bar Chart

0
BBhanu Siva Kumar Kommana
Last edited Mar 5, 2023
Created on Mar 5, 2023
Forked from Making a Bar Chart

This example shows a simple bar chart comparing quantities of five fruits, with each bar filled in orange against a blank background. The visualization renders in SVG, using D3 version 5’s core selection and data-binding methods to load values from an external CSV file. The code creates a fixed 960 by 500 pixel canvas and uses D3’s `scaleBand` and `scaleLinear` to position and size the rectangles based on the parsed data, while the stylesheet sets the fill color.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed