Skip to main content
Public

Share visualization

Loading preview…

Intro to D3.js

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

Intro to D3.js

0
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.

Comments

Sign in to join the discussion.

MIT Licensed