Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Sample Bar Chart

Public visualization

Viewing a saved revision (read-only)

2dd884aaed7448d3811c4c1f25705937

Sample Bar Chart

0 stars0🌍 Public
KKrittaprot Tangkittikun
Last edited Aug 16, 2023
Created on Aug 14, 2023
Forked from D3 Starter

This example displays a randomized dataset of 25 numeric values as a series of vertical bars, with each bar’s height proportional to its corresponding data point. The bars are rendered as inline-block HTML `div` elements styled with teal backgrounds and fixed widths. The sample uses D3 v7’s data join pattern—`d3.select().data().enter().append()`—to bind the data and generate the bars, while `Math.random()` produces the source values. The visualization demonstrates a basic bar chart without axes or scales, relying on a simple pixel-to-value mapping.

AI-generated description

A demonstration of how to start using D3 version 6.