Skip to main content
100%

Vertical Bar Chart - Volkskrant

✓ Published1🌍 Public
Ddavidvanr21
Last edited Jan 27, 2021
Created on Jan 27, 2021

This example presents a vertical bar chart comparing the populations of ten countries, rendered as SVG rectangles scaled with `d3.scaleBand` and `d3.scaleLinear`. The bars initially appear steelblue, and on `mouseover` events, the chart highlights the hovered bar in red with a blue stroke and displays a text label inside it showing the country name and population in billions, formatted using D3’s `format` function. The `mouseout` handler removes the label and restores the original fill. Data loads from a CSV file, with population values multiplied by 1000.

AI-generated description

This is on Bar Chart which can change color when mouseover.

MIT Licensed

Similar vizzes