Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Histogram Transition

Public visualization

Viewing a saved revision (read-only)

49cc0bc503814ce0bbb8bbc397b738e4

Histogram Transition

0 stars1🌍 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.