Skip to main content
Public

Share visualization

Loading preview…

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

Making a Bar Chart

0
NNita
Last edited Dec 11, 2018
Created on Sep 13, 2018

This example shows a bar chart built with D3.js version 5, where the vertical axis maps data values using a linear scale with rounded output coordinates. The chart’s height and width are read directly from the SVG element, and an array of ten generated data points is created using the d3.range function. The visualization is rendered as an SVG, with the y-axis scale defined through d3.scaleLinear and a d3.line object configured to position points based on the data values, though the actual bar drawing is not visible in the provided code.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed