Skip to main content
100%

Histogram Transition

✓ Published1🌍 Public
Jjbruzzo
Last edited Oct 26, 2022
Created on Oct 26, 2022
Forked from Humidity histogram

This example shows how a histogram transitions between different weather metrics, such as wind speed and temperature, from a JSON dataset. Clicking the “Change metric” button updates the display, with exiting bars collapsing downward in red, new bars rising in yellow-green, and final bars colored cornflower blue. Built with React and D3 v5, it uses `d3.histogram` to bin data, `d3.scaleLinear` for axes, and D3 transitions with chained `transition().duration()` calls to animate bar height, position, and a dashed mean line. The visualization renders in SVG.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes