Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Making a Bar Chart

Public visualization

Viewing a saved revision (read-only)

7f14c4db7df64fa79cf260c9acafa3d9

Making a Bar Chart

0 stars0🌍 Public
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