Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shapes and Colors with SVG and CSS

Public visualization

Viewing a saved revision (read-only)

4ecd596d60974572b49c3f5d8409a1ac

Shapes and Colors with SVG and CSS

0 stars1🌍 Public
Ssarakouz
Last edited Nov 11, 2020
Created on Nov 11, 2020

This example displays restaurant ratings as horizontal bars, with each bar’s width proportional to the rating value and its vertical position determined by the restaurant name. The chart uses D3 v6’s `scaleLinear` and `scaleBand` to map the data, while SVG rectangles are appended and styled via CSS. The visualization reads from a local CSV file and updates dynamically when the data loads, offering a clean, minimal view of comparative scores.

AI-generated description