Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Wine Sales.js!

Public visualization

Viewing a saved revision (read-only)

240b308cbd9148dd92ac23b13e5f8f94

Wine Sales.js!

0 stars0🌍 Public
Kkkeebaugh
Last edited Mar 8, 2022
Created on Mar 8, 2022

This example uses a bar chart to display the average income associated with seven different wine varieties. The chart, rendered as an SVG, loads data from a CSV file containing wine names and income values, converting the income strings to numbers. The visualization is built with D3.js v5, leveraging `csv`, `scaleLinear`, `scaleBand`, `axisLeft`, and `axisBottom` to position and draw the bars with a steelblue fill. The bars are appended to the SVG element, with their widths proportional to income and their vertical positions determined by wine type.

AI-generated description

Demonstrates fundamental DOM manipulation using D3.js by making a smiley face whose eyebrows move.