Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

colored bar chart

Public visualization

Viewing a saved revision (read-only)

c4071405dc114920a4032b033b463b52

colored bar chart

0 stars1🌍 Public
JJunyanL
Last edited Mar 6, 2020
Created on Mar 6, 2020

A colored bar chart displays a dataset of numeric values as vertical bars, with color mapping from green through orange to red via a `d3.scaleLinear` domain of 0 to 110. React state management allows the user to increment, filter (values ≤ 50), or randomly append data through buttons, triggering `useEffect` updates. The SVG is rendered using `scaleBand` for x-positioning, `scaleLinear` for y-scaling, and D3 v5 axes. Bars animate on transitions, and mouseenter events create tooltips with D3 text elements that fade in.

AI-generated description