Skip to main content
Public

Share visualization

Loading preview…

ICE-6

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

ICE-6

0
Ggeethanjalikotaru
Last edited Mar 12, 2023
Created on Mar 3, 2023

This bar chart displays the ages of the first fifteen employees from a company dataset, with each row labeled by full name and bar length proportional to age. Built with React and D3 v5, it uses `d3.csv` to load remote CSV data, `d3.scaleBand` and `d3.scaleLinear` for axes, and renders an SVG with `rect` elements for bars. Grid lines and tick labels are generated via `d3.ticks`, while the layout follows a margin convention in a `VizContainer` component.

AI-generated description

Boilerplate code for a React + D3 visualization with:

  • CDN links for React, ReactDOM, and D3
  • Basic React boilerplate
  • Variables for dimensions and margins
  • A VizContainer component that:
    • Abstracts SVG/group container elements
    • Follows the margin convention
    • Show the margins, which can be easily removed by deleting the showMargins={true} prop

Comments

Sign in to join the discussion.

MIT Licensed