Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Document

Public visualization

Viewing a saved revision (read-only)

67a065c1e499497db55f8e2d0bbb75f5

Document

0 stars0🌍 Public
HHítalo Silva
Last edited Mar 16, 2020
Created on Mar 16, 2020
Forked from HTML Starter

This example shows a bar chart of country counts that updates when new data is added. It uses d3.json to load initial data from data.json, then d3.scaleLinear and d3.scaleBand to map values to positions. The visualization renders bars as SVG rectangles with d3.axisLeft and d3.axisBottom for axes. After two seconds, a new item is pushed to the dataset and re-rendered, using transition().duration(500) to animate the height of the entering bar from zero while existing bars shift via the same transition.

AI-generated description

Testing graph with post data update.