Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of Fork of Shapes and Colors with SVG and CSS-- ME

Public visualization

Viewing a saved revision (read-only)

91284066899448ffbda2f87c99ec0fc6

Fork of Fork of Shapes and Colors with SVG and CSS-- ME

0 stars1🌍 Public
Ddiegobrivo
Last edited Aug 13, 2022
Created on Aug 13, 2022

This example shows a bar chart of monthly values from a CSV file, using SVG rectangles positioned along a time-based x-axis and a linear y-axis scaled to the data’s maximum. The code loads data with `csv` from D3 v7, then uses `scaleBand` and `scaleLinear` to map each row to a bar’s position and height. A data join appends `rect` elements to the SVG, relying on the coordinate system’s top-left origin. The chart is styled minimally with CSS, which sets default margins and stroke properties.

AI-generated description

An example including some commonly used features of SVG.