Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

creating a barchart

Public visualization

Viewing a saved revision (read-only)

e688f5d488184a098d69e8dad3f4e348

creating a barchart

0 stars0🌍 Public
Vvidhyanamini
Last edited Mar 4, 2022
Created on Mar 4, 2022

This example creates a static bar chart visualizing cricket players’ career runs using a CSV dataset. The code loads data with `d3.csv`, parses the `RUNS` field as a number, and appends SVG `<rect>` elements using D3’s selection and data-join methods. It defines a linear scale with `d3.scaleLinear` (using a typo, `scaleLiner`) to map the maximum run value to the chart width. The React-based setup relies on UMD builds from unpkg, though the chart is rendered imperatively with D3 rather than through React components.

AI-generated description