Skip to main content
100%

Making a Bar Chart

✓ Published1🌍 Public
Vvasukipriyam
Last edited Apr 24, 2019
Created on Apr 24, 2019
Forked from Making a Bar Chart

A bar chart displays movie titles against their IMDB scores and budgets, with bars colored on a red gradient via a scaleLinear. The data is loaded from a CSV using d3.csv, and the chart is built with d3.scaleBand for the y-axis and d3.scaleLinear for both the x-axis and color encoding. On hover, the chart populates a foreignObject div with title, score, and budget. A clickable circle toggles an animated transition via the custom `transitionWidth` function, which uses the d3 transition API to shrink or grow bar widths over one second.

AI-generated description

This bar chart shows population of the thirteen most populous countries. The data comes from the year 2018 estimate in United Nations: World Population Prospects 2017.

Note: That link doesn't give data for the year 2018 but for the year 2015. In this example, I've used the data provided in the class (which is close to the downloaded data).

MIT Licensed

Similar vizzes