Skip to main content
100%

White Hat Bar Chart

✓ Published0🌍 Public
PPranay Matalia
Last edited Apr 26, 2022
Created on Apr 26, 2022
Forked from HTML Starter

This example shows annual rainfall totals from 2014 through 2021 as a simple bar chart, with each bar’s height encoding millimeters of rain and axes labeled for both year and rainfall length. The visualization is built with D3 v7 in an SVG container, using `d3.scaleBand` to position bars and `d3.scaleLinear` to map rainfall values to pixel heights. The code loads data from an external CSV file via `d3.csv`, then renders bars with `container_g.selectAll(".bar")` and adds bottom and left axes using `d3.axisBottom` and `d3.axisLeft`. A rotated text label and custom tick format (`d + "mm."`) annotate the chart.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes