Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3.js Line Chart

Public visualization

Fork of D3.js Line Chart

0 stars0🌍 Public
NNikitha123171
Last edited Mar 26, 2023
Created on Mar 26, 2023
Forked from D3.js Line Chart

This chart visualizes the Crime Index across 22 countries, using a line to connect each country’s index value along a categorical x-axis. Built with D3.js v7, it loads data from a CSV file using `d3.csv` and renders an SVG line chart with band-scaled x positions and linear y scaling. The code uses `d3.scaleBand`, `d3.scaleLinear`, `d3.axisBottom`, and `d3.axisLeft` to construct axes, while drawing the line via `d3.line` and styling it with steelblue stroke attributes from CSS. Axis labels are added as SVG text elements.

AI-generated description

A reusable scatter plot inspired by Towards Reusable Charts.

Shows the Iris Dataset.

Comments

Sign in to join the discussion.

MIT Licensed