Skip to main content
100%

Data Visualization Module 3 - Bar Chart

✓ Published0🌍 Public
QQinita
Last edited May 4, 2015
Created on May 4, 2015

This example displays a simple horizontal bar chart of a static JavaScript array of numeric values. Each value is represented by a steelblue rectangle, with the bar width proportional to the number and the numeric label printed at its end. The code uses D3 v3’s `d3.select` and `data` binding to append `div` elements, and applies a linear scale (`d3.scale.linear`) to map the data domain to pixel widths up to 420 pixels. All styling is done via inline CSS on the divs.

AI-generated description

Similar vizzes