Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Fork of D3 Bar Chart Scales

Public visualization

Fork of D3 Bar Chart Scales

0 stars0🌍 Public
TTony Mai
Last edited Feb 27, 2026
Created on Feb 27, 2026

This example shows a two-scale bar chart using synthetic data, with band and linear scales mapping values to SVG rectangles. The D3 v4 code builds an SVG with bars shaded by value using `scaleBand` for the x-axis and `scaleLinear` for the y-axis, then appends text labels atop each bar. The chart animates when a paragraph is clicked, though no click handler is defined, so the visualization remains static. Data comes from an inline array.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed