Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Intro to D3.js

Public visualization

Viewing a saved revision (read-only)

32214f6d9fe2479198b946235cb48dd9

Intro to D3.js

0 stars0🌍 Public
SShweta-tech
Last edited Jan 5, 2020
Created on Jan 4, 2020
Forked from Customizing Axes

This example shows a bar chart built with D3.js, displaying numeric values as vertical bars with corresponding value labels above each bar. It reads from an embedded dataset of eight numbers and renders them using SVG rectangles via `d3.select`, `selectAll`, and `data().enter().append()`. The chart sets fixed width and height attributes, calculates bar widths based on dataset length, and positions bars with a `translate` transform. Text elements display each value in a distinct color. The code uses the `d3.v5` library and is structured with React-ready starter files.

AI-generated description

React Starter code.